cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: question on "--request":can I remove the " /" after the request?

From: FUN TOES <funtest_at_operamail.com>
Date: Mon, 01 Mar 2004 17:07:02 +0100

> Date: Mon, 1 Mar 2004 10:28:04 +0100 (CET)
> From: Daniel Stenberg <daniel-curl_at_haxx.se>
> Subject: Re: question on "--request":can I remove the " /" after the
> request?
> To: curl tool talk <curl-users_at_cool.haxx.se>
> Message-ID: <Pine.LNX.4.58.0403011022360.11959_at_linux3.contactor.se>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> On Mon, 1 Mar 2004, FUN TOES wrote:
>
> > curl -v0 --request "GET http://www.google.com/search?hl=en" targetproxy.
> > I found the http request sent like this:
> > > GET http://www.google.com/search?hl=en / HTTP/1.0
> > Can I remove the " /" before " HTTP/1.0"?
>
> No you can't. And no, you're not supposed to use that option like that since
> it creates weird HTTP requests, exactly as you found out.
>
> Removing the path from the request just because you abuse the 'request' option
Yeah,but I have no idear how to change the http_request to
fit for the second proxy.
> is not an option for libcurl.
>
> > (some httpproxy will give error for it).
>
> So why do you use it like this?
I want to visit some site through two http proxy.
>
> > I step into url.c with gdb,but I can't find where the " /" was append to the
> > urlbuffer.After a do_curl() call,this request is sent.I can't find what is
> > the do_curl() used. Would you like give me some clues?
>
> The code that creates the whole HTTP request is in Curl_http(). I can't give
> you any exact line numbers since my devel version is much changed since the
> latest official release, but if you checkout from CVS it is line 1345 in
> lib/http.c.
Thank you very much!I will study it immediately.
>
> > Because of the targetproxy I used is usually the second proxy.(culr -p -U
> > user:pass -x httpproxy1:port1 -X "GET http://target/search?..." -0
> > proxy2:port2).I have no other choice.
>
> I don't follow you. Are you saying that you're trying to make your request go
> through two proxies? Can you show us a complete command line that you think
> would do this? (If it would cut out the extra path)
Yeah!That is it.The complete comand line is like this:
curl -vp0 -x myproxy:8080 -U user:pass 61.132.137.170:3128 -X "GET http://www.google.com/search?hl=en"
I want to visit http://www.google.com/search?hl=en via
two proxy (myproxy,61.132.137.170).
Because curl's "-x" option only work once,I can only find this method to through the second proxy.
And it failed to some extra request including path as you said.
Would you like to give me some more idears?
Thank you!

>
> --
> Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
> [[ Do not send mails to this email address. They won't reach me. ]]
>
>
> ------------------------------
>
> _______________________________________________
> Curl-users mailing list
> Curl-users_at_cool.haxx.se
> http://cool.haxx.se/mailman/listinfo/curl-users
>
>
> End of Curl-users Digest, Vol 2, Issue 1
> ****************************************

-- 
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
>From your mailbox to local or overseas cell phones.
Powered by Outblaze
Received on 2004-03-01