hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake C" <buddhabu...@hotmail.com>
Subject Re: https now works, but http doesnt?!?!
Date Mon, 04 Dec 2006 19:52:00 GMT
OK, everything works again!

For some reason, the web server on the http server wasn't forwarding 
"/<application>/" to "/application/login.aspx" for HttpClient any more, but 
was for IE. It worked fine on the https server. However, when I add 
"login.aspx" to the URI, it works in both cases.

Thanks again for all the help!

>From: "Julius Davies" <juliusdavies@gmail.com>
>Reply-To: "HttpClient User Discussion" <httpclient-user@jakarta.apache.org>
>To: "HttpClient User Discussion" <httpclient-user@jakarta.apache.org>
>Subject: Re: https now works, but http doesnt?!?!
>Date: Sat, 2 Dec 2006 13:38:26 -0500
>Hi, Jake,
>Sounds frustrating!
>On 12/2/06, Jake C <buddhabuddy@hotmail.com> wrote:
>>I tried all of that.
>>I call "client.setState(new HttpState());" before my transactions and
>>removed the synchronized blocks.
>>I checked the forms I'm posting to on both servers, and they are identical
>>except for the __VIEWSTATE value.
>You checked the HTML forms?  Are they are both using "method=POST" ?
>And so in HttpClient you're creating the
>"application/x-www-form-urlencoded" RequestEntity and adding it to
>your PostMethod.
>>I print out the URI and the parameters I'm adding. If I paste the URI into
>>the web browser then add the parameters manually
it works just fine!
>When you do that (paste a URI into a browser) then you're doing a GET
>request, not a POST request.  You have to actually click on the
>"submit" button of a method=POST form do actually do a post.
>>I printed out the Headers:
>>header[0]:User-Agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 
>>.NET CLR 1.1.4322)
>Are these the headers your browser sent?  Or that HttpClient sent?
>>The content length is exactly the right length for all my parameters and
>>values, with a = between the name and value, and an & between each pair.
>>The Method is a PostMethod, and my URI is correct. What the heck is going
>>on? Is there another level of debugging I can turn on to help track this
>>This is EXTREMELY frustrating! Why should it work for https and not for
>>http? What could possible be the difference between the two?
>>Here is the rest of the information I'm printing out:
>>reason=Method not allowed
>>status=405, Method not allowed
>>contentType=Content-Type: text/html
>>All of this is identical for the https situation except for the URI, which
>>says https and has no port specified.
>Yeah, that doesn't make sense.  Another angle to try and learn more
>information is to try "telnetting" to your HTTP server and just typing
>in the headers and content manually:
>telnet <host> 8080
>POST /<app>/ HTTP/1.1
>host: <host>
>Julius Davies
>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

All-in-one security and maintenance for your PC.  Get a free 90-day trial! 

To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

View raw message