Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Brett Ryan
> Since I produce the xml in memory, that's the way Marshal.marshal method > works, I could use the ByteArrayEntity using the byte[] from the > ByteArrayOutputStream supplied to marshal. Could you not do something like PipedOutputStream out = new PipedOutputStream(); InputStream instr = new

Please remove me from the list

2015-02-26 Thread Maurice MILLS
Hello, I have made several requests to unsubscribe from the list and I still receive the mails. Can you please remove me from the list? Thanks, Maurice This message and any attachments (the "message") is intended solely for the intended addressees and is confidential. If you receive this mes

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Oleg Kalnichevski
On Thu, 2015-02-26 at 08:26 +0100, Alessandro Manzoni wrote: > Hi Stefan, > thank you for the reply, > Post a wire log of the session exhibiting the problem. Oleg > Il 25.02.2015 20.44, Stefan Magnus Landrø ha scritto: > > 2015-02-25 20:07 GMT+01:00 Alessandro Manzoni >> : > >> Il 25.02.2015 1

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Oleg Kalnichevski
On Thu, 2015-02-26 at 19:04 +1100, Brett Ryan wrote: > > Since I produce the xml in memory, that's the way Marshal.marshal method > > works, I could use the ByteArrayEntity using the byte[] from the > > ByteArrayOutputStream supplied to marshal. > > > Could you not do something like > > Piped

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Brett Ryan
> On Thu, 2015-02-26 at 19:04 +1100, Brett Ryan wrote: >>> Since I produce the xml in memory, that's the way Marshal.marshal method >>> works, I could use the ByteArrayEntity using the byte[] from the >>> ByteArrayOutputStream supplied to marshal. >> >> >> Could you not do something like >>

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Oleg Kalnichevski
On Thu, 2015-02-26 at 20:26 +1100, Brett Ryan wrote: > > On Thu, 2015-02-26 at 19:04 +1100, Brett Ryan wrote: > >>> Since I produce the xml in memory, that's the way Marshal.marshal method > >>> works, I could use the ByteArrayEntity using the byte[] from the > >>> ByteArrayOutputStream supplied

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Stefan Magnus Landrø
or a tcp dump if you prefer. Could it be a transfer encoding issue? Is there a proxy involved in this process? 2015-02-26 9:50 GMT+01:00 Oleg Kalnichevski : > On Thu, 2015-02-26 at 08:26 +0100, Alessandro Manzoni wrote: > > Hi Stefan, > > thank you for the reply, > > > > Post a wire log of the se

Re: Please remove me from the list

2015-02-26 Thread Alessandro Manzoni
Il 26.02.2015 09.26, Maurice MILLS ha scritto: Hello, I have made several requests to unsubscribe from the list and I still receive the mails. Can you please remove me from the list? Thanks, Maurice To remove your address from the list, send a message to: as was stated in subscription

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
Il 26.02.2015 11.59, Stefan Magnus Landrø ha scritto: or a tcp dump if you prefer. Could it be a transfer encoding issue? Is there a proxy involved in this process? The error is returned only with certain post (I noticed that only posts >30KB are rejected), while the encoding is always the same

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
Thank you Oleg, Il 26.02.2015 09.52, Oleg Kalnichevski ha scritto: On Thu, 2015-02-26 at 19:04 +1100, Brett Ryan wrote: Since I produce the xml in memory, that's the way Marshal.marshal method works, I could use the ByteArrayEntity using the byte[] from the ByteArrayOutputStream supplied to ma

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Oleg Kalnichevski
On Thu, 2015-02-26 at 13:06 +0100, Alessandro Manzoni wrote: > Il 26.02.2015 11.59, Stefan Magnus Landrø ha scritto: > > or a tcp dump if you prefer. Could it be a transfer encoding issue? Is > > there a proxy involved in this process? > The error is returned only with certain post (I noticed that

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Oleg Kalnichevski
On Thu, 2015-02-26 at 13:28 +0100, Alessandro Manzoni wrote: > Thank you Oleg, > Il 26.02.2015 09.52, Oleg Kalnichevski ha scritto: > > On Thu, 2015-02-26 at 19:04 +1100, Brett Ryan wrote: > >>> Since I produce the xml in memory, that's the way Marshal.marshal method > >>> works, I could use the B

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alexey Panchenko
Hi, IMHO the problem is in this line: StringEntity entity = new StringEntity(new String(output.toByteArray()), ContentType.TEXT_XML); Charset is not specified when constructing a String instance, so a system default one is used, most likely UTF-8 on linux. And then StringEntity wants to have byt

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
Thank you very much, Il 26.02.2015 13.33, Oleg Kalnichevski ha scritto: On Thu, 2015-02-26 at 13:06 +0100, Alessandro Manzoni wrote: Il 26.02.2015 11.59, Stefan Magnus Landrø ha scritto: or a tcp dump if you prefer. Could it be a transfer encoding issue? Is there a proxy involved in this proce

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Stefan Magnus Landrø
Try http://www.tcpdump.org/manpages/tcpdump.1.html in case the simple wire logging thing doesn't work out for you. You can restrict interface and destination port to reduce impact on production. 2015-02-26 13:06 GMT+01:00 Alessandro Manzoni : > Il 26.02.2015 11.59, Stefan Magnus Landrø ha scritto

RE: Please remove me from the list

2015-02-26 Thread Maurice MILLS
And that is what I did several times and it didn't work. I just sent it again so we'll see -Original Message- From: Alessandro Manzoni [mailto:manzoni.alessand...@gmail.com] Sent: jeudi 26 février 2015 12:57 To: HttpClient User Discussion Subject: Re: Please remove me from the list

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Brett Ryan
I thought Oleg pointed this out already. If you build up a byte array for your request that byte array must fully occupy local memory, streaming this will both send data to the host as its constructed directly from the marshaller which is not only more efficient but will rule out any issue resu

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
Il 26.02.2015 17.22, Brett Ryan ha scritto: I thought Oleg pointed this out already. If you build up a byte array for your request that byte array must fully occupy local memory, streaming this will both send data to the host as its constructed directly from the marshaller which is not only mo