Darshit Shah <[email protected]> writes: > while I agree that your patch makes the code more readable and it is > > good to apply it, I don't see how the previous version was broken. > What > compiler have you used? > > I see you pushed the patch. But have we gotten to the bottom of the > cause? If the result changes with the GCC version, we should probably > report it upstream.
no, my mistake. I remembered that it was correct to change the lvalue on the left side of the assignment but it seems not the case, and that is an undefined behaviour; good that you hit this problem and fixed it. > no, it doesn't, same for GET. > > True. No sense suspending and setting the same method again. But adding > code to test for the same may add enough overhead to negate most gains > obtained by preventing it. > I feel we should instead ignore processing the --method option if it's > argument is "GET". > Also, I am not aware, but is there any use case where a user may wish > to send body-data with a GET request? maybe testing the web server :-) but let's keep in mind the normal usage and it seems correct to use "--method GET" or "--method HEAD", in this case we should raise a warning if the user also specifies a body-data saying that the body-data is ignored. Giuseppe
