[Bug-wget] http.c code cleaning

2013-05-08 Thread Dmitry Bogatov
In comment to `request_new` was that it *always* must be followed by `request_set_method`. I changed code to combine these functionality into single function. Please, review. From 4e2a98f3746400846486de0e57b4d68e654622f3 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov kact...@gnu.org Date: Wed, 8

Re: [Bug-wget] Segmentation fault with current development version of wget

2013-05-08 Thread Giuseppe Scrivano
Darshit Shah dar...@gmail.com writes: We suspend the post data only when we receive a 307, or do you mean we shouldn't suspend in this case too? It's the other way round. A 307 response code is used when the server wishes to explicitly ask the client to not suspend.

Re: [Bug-wget] http.c code cleaning

2013-05-08 Thread Giuseppe Scrivano
Darshit Shah dar...@gmail.com writes: In comment to `request_new` was that it *always* must be followed by `request_set_method`. I changed code to combine these functionality into single function. Please, review. Looks good to me. Just one thing though, the method string is now converted

Re: [Bug-wget] How to tell wget to strip part following question mark in local filenames?

2013-05-08 Thread Tim Rühsen
Hi, Am Mittwoch, 8. Mai 2013 schrieb Mark: Hi, I noticed some problems relating to URLs like http://www.example.com/path/to/filename.zip?arg1=somestringarg2=anotherstring;... Wget doesn't strip the ? and following characters from the filename when creating local files. As far as I can

Re: [Bug-wget] http.c code cleaning

2013-05-08 Thread Giuseppe Scrivano
Dmitry Bogatov kact...@gnu.org writes: - meth = opt.method; + { +char *q; +for (q = opt.method; *q; ++q) + *q = c_toupper (*q); +meth = opt.method; + } this code should go. Now you can assume opt.method is already uppercase as this is

Re: [Bug-wget] Segmentation fault with current development version of wget

2013-05-08 Thread Darshit Shah
We currently suspend any method if the response code is a non 307 redirect. That I believe is wrong. We should only be suspending the POST method and not others. It sounds good, but we must be careful also with 303. Do you agree that the matrix for the method to use on the next request