Thanks Petr!
Commited into CVS version.
On 27/08/07, Petr Vodička <[EMAIL PROTECTED]> wrote:
> Hello,
>
> i experienced problems with shttpd version 1.37 when i put submits named
> "block" and "unblock" on my page and try to get their values by calling
> function:
> void shttpd_get_form_var(struct shttpd_arg *arg, const char
> *var_name, char *buffer, size_t sz)
>
> becuase "block" may be seen as to be part of "unblock", algorithm failed and
> result vas bad.
>
> I wrote a little patch to function shttpd_get_var, according to your comments
> with buf format:
>
> /* buf is "var1=val1&var2=val2...". Find variable first */
> for (p = buf; p < e; p++)
> if (!my_strncasecmp(var, p, var_len) && p[var_len] == '=' &&
> (p==buf || *(p-1) == '&')) {
>
> /* Found. Shift to variable value */
> e = buf + buf_len;
>
> So, again, i added:
>
> && (p==buf || *(p-1) == '&')
>
>
>
> If this problem has been dropped out in further future version, you can
> delete this mail :-)
>
> Thank you.
>
>
> --
> Best regards
> Petr Vodicka
> XPHONE VoIP service
> project manager
> direct line: +420 417 669 114
> call center: +420 417 669 122
> fax: +420 417 669 199
> jabber: [EMAIL PROTECTED]
> email: [EMAIL PROTECTED]
>
>
> Confidentiality Notice: The information in this document
> and attachments is confidential and private. It is
> intended only for the use of the named recipient. If you
> are not the intended recipient, please notify us
> immediately. Do not disclose the contents of this document
> to any other person, nor take any copies.
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general