hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom Hehl <t...@nowhereatall.com>
Subject Re: 400 Bad Request
Date Mon, 03 Oct 2005 09:31:09 GMT
Other than the addition of: 2005/10/03 05:28:30:718 EDT [DEBUG] header - 
 >> "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)[\r][\n]"

There is no change to the log file. Same error as before.

Michael Becke wrote:

>You'll need to change he user-agent parameter
><http://jakarta.apache.org/commons/httpclient/preference-api.html>.
>
>Mike
>
>On 10/2/05, Thom Hehl <thom@nowhereatall.com> wrote:
>  
>
>>How?
>>
>>Oleg Kalnichevski wrote:
>>
>>    
>>
>>>On Sun, 2005-10-02 at 12:17 -0700, Thomas Hehl wrote:
>>>
>>>
>>>      
>>>
>>>>OK, so I removed the question mark, but it didn't change the problem. Here
is the log...
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>Try masquerading HttpClient as IE:
>>>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
>>>
>>>Oleg
>>>
>>>
>>>
>>>      
>>>
>>>>rex version 0.9.3
>>>>copyright 2005, Heavyweight Software, all rights reserved
>>>>Process started at 10/02/2005 at 03:15:02 PM
>>>>0    [main] INFO  heavyweight.io.CgiProcessor  - Constructor
>>>>0 [main] INFO heavyweight.io.CgiProcessor  - Constructor
>>>>2005/10/02 15:15:02:109 EDT [DEBUG] HttpClient - Java version: 1.5.0_05
>>>>2005/10/02 15:15:02:109 EDT [DEBUG] HttpClient - Java vendor: Sun Microsystems
Inc.
>>>>2005/10/02 15:15:02:109 EDT [DEBUG] HttpClient - Java class path: rex.jar
>>>>2005/10/02 15:15:02:109 EDT [DEBUG] HttpClient - Operating system name: Windows
XP
>>>>2005/10/02 15:15:02:109 EDT [DEBUG] HttpClient - Operating system architecture:
x86
>>>>2005/10/02 15:15:02:109 EDT [DEBUG] HttpClient - Operating system version:
5.1
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] HttpClient - SUN 1.5: SUN (DSA key/parameter
generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore;
PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] HttpClient - SunRsaSign 1.5: Sun RSA signature
provider
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] HttpClient - SunJSSE 1.5: Sun JSSE provider(PKCS12,
SunX509 key/trust factories, SSLv3, TLSv1)
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] HttpClient - SunJCE 1.5: SunJCE Provider
(implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] HttpClient - SunJGSS 1.0: Sun (Kerberos
v5)
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] HttpClient - SunSASL 1.5: Sun SASL provider(implements
client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for:
DIGEST-MD5, GSSAPI, CRAM-MD5)
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.useragent
= Jakarta Commons-HttpClient/3.0-rc3
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.version
= HTTP/1.1
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.connection-manager.class
= class org.apache.commons.httpclient.SimpleHttpConnectionManager
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.cookie-policy
= rfc2109
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset
= US-ASCII
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.content-charset
= ISO-8859-1
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler
= org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@1d6096
>>>>2005/10/02 15:15:02:218 EDT [DEBUG] DefaultHttpParams - Set parameter http.dateparser.patterns
= [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE,
dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy
HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss
z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy
HH:mm:ss z]
>>>>2005/10/02 15:15:02:234 EDT [DEBUG] DefaultHttpParams - Set parameter http.connection.timeout
= 25000
>>>>2005/10/02 15:15:02:234 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.single-cookie-header
= true
>>>>2005/10/02 15:15:02:234 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.cookie-policy
= rfc2109
>>>>188  [main] INFO  heavyweight.io.CgiProcessor  - Leaving constructor
>>>>188 [main] INFO heavyweight.io.CgiProcessor  - Leaving constructor
>>>>2005/10/02 15:15:02:296 EDT [DEBUG] HttpConnection - Open connection to orgmeta.xmlsweb.com:3245
>>>>2005/10/02 15:15:04:421 EDT [DEBUG] header - >> "GET orgs.xml HTTP/1.1[\r][\n]"
>>>>2005/10/02 15:15:04:421 EDT [DEBUG] HttpMethodBase - Adding Host request header
>>>>2005/10/02 15:15:04:437 EDT [DEBUG] header - >> "User-Agent: Jakarta
Commons-HttpClient/3.0-rc3[\r][\n]"
>>>>2005/10/02 15:15:04:437 EDT [DEBUG] header - >> "Host: orgmeta.xmlsweb.com:3245[\r][\n]"
>>>>2005/10/02 15:15:04:437 EDT [DEBUG] header - >> "[\r][\n]"
>>>>2005/10/02 15:15:06:937 EDT [DEBUG] header - << "HTTP/1.1 400 Bad Request[\r][\n]"
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] header - << "Server: Microsoft-IIS/5.0[\r][\n]"
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] header - << "Date: Sun, 02 Oct 2005
19:15:08 GMT[\r][\n]"
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] header - << "Connection: close[\r][\n]"
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] header - << "Content-Type: text/html[\r][\n]"
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] header - << "Content-Length: 87[\r][\n]"
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] content - << "<html><head><title>Error</title></head><body>The
parameter is incorrect. </body></html>"
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] HttpMethodBase - Should close connection
in response to directive: close
>>>>2005/10/02 15:15:06:953 EDT [DEBUG] HttpConnection - Releasing connection
back to connection manager.
>>>>Exception in thread "main" java.io.IOException: Attempted read on closed stream.
>>>>     at org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(AutoCloseInputStream.java:165)
>>>>     at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:106)
>>>>     at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
>>>>     at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
>>>>     at sun.nio.cs.StreamDecoder.read(Unknown Source)
>>>>     at java.io.InputStreamReader.read(Unknown Source)
>>>>     at java.io.BufferedReader.fill(Unknown Source)
>>>>     at java.io.BufferedReader.readLine(Unknown Source)
>>>>     at java.io.BufferedReader.readLine(Unknown Source)
>>>>     at retransform.idxloader.ParagonUtil.findImages(ParagonUtil.java:49)
>>>>     at rex.IdxFileConverter.main(IdxFileConverter.java:313)
>>>>
>>>>Anyone?
>>>>
>>>>--- Oleg Kalnichevski <olegk@apache.org> wrote:
>>>>
>>>>From: Oleg Kalnichevski <olegk@apache.org>
>>>>Date: Sun, 02 Oct 2005 20:10:22 +0200
>>>>To: httpclient-user@jakarta.apache.org
>>>>Subject: Re: 400 Bad Request
>>>>
>>>>On Sun, 2005-10-02 at 08:31 -0700, Thomas Hehl wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>So, I guess, I'm trying to figure out what the next step is. Anyone know
how to make httpclient not stick a ? at the end of a GET? Anyone have any other ideas?
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>HttpClient does not append a question mark to urls out of the blue. I
>>>>suspect this is what your code passes to the GetMethod constructor as a
>>>>parameter or somewhere in your code the query string of the GetMethod
>>>>instance is set to ""
>>>>
>>>>Oleg
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Thanks!
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>
>  
>


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


Mime
View raw message