[PATCHv2] httpd: don't drop QUERY_STRING when /cgi-bin/index.cgi is used
Peter Korsgaard
jacmet at sunsite.dk
Sat Dec 17 10:32:28 UTC 2011
>>>>> "walter" == walter harms <wharms at bfs.de> writes:
Hi,
>> +#if ENABLE_FEATURE_HTTPD_CGI
>> + /* when index_page string is appended to <dir>/ URL, it overwrites
>> + the query string. If we fallback to call /cgi-bin/index.cgi,
>> + query string would be lost and not available to the CGI.
>> + Work around it by making a deep copy instead.
>> + */
>> + g_query = xstrdup(tptr);
>> +#else
>> g_query = tptr;
>> +#endif
>> }
>>
walter> Would it hurt to call xstrdup() all time ?
walter> that would save us from the #if
walter> and simplify to code.
True. query strings are fairly short, so it probably wouldn't be
significant (and only for the few people using httpd without CGI
support) - Denys, what do you say?
--
Bye, Peter Korsgaard
More information about the busybox
mailing list