You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Richard Sayre <ri...@gmail.com> on 2007/12/05 18:32:56 UTC

HTTP 1.1 Not Supported

I have a C Sharp Pocket PC application that is hitting a Tomcat web
server and getting some data from that server.  With Tomcat 4.1 this
application is working fine, but since I upgraded to Tomcat 6 it
stopped working.

Most of the application works with Tomcat 6.  When It does work here
is the scenario:


1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
through "POST"
2. The jsp servlet gets some XML from the model and puts it into a
String and prints it using the output stream
3. the C# App receives the data ok through a response object


When it doesn't work the following occurs:


1.       Pocket Pc requests a page through POST and opens a stream and
writes some data to the stream (Some xml data)
2.       The pocket pc app tries to obtain a Response object from the request
3.       On the line of code that tries to obtain a response I get a
server error



HTTP/1.1 505

HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
Dec 200713:08:21 GMT..Connection: close

Which is weird since my connector is as follows:

<Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
protocol="HTTP/1.1" redirectPort="8443"/>

I am using Tomcat 6.0.14 which came bundled with Netbeans 6.

Thank you,

Rich

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Richard Sayre <ri...@gmail.com>.
The Pocket PC is sending XML data to Tomcat.  The XML contains all of
the changes made to the data on the Pocket PC.

On Dec 5, 2007 2:38 PM, Caldarale, Charles R <Ch...@unisys.com> wrote:
> > From: Richard Sayre [mailto:richardsayre@gmail.com]
> > Subject: Re: HTTP 1.1 Not Supported
> >
> > > And what does the access log (or Wireshark trace) show as
> > > being sent by the app on the Pocket PC?
> > >
> > Using Ethereal I found that Tomcat is sending this error back to my
> > Pocket PC application:
>
> Not what I asked; what exactly is the Pocket PC sending to Tomcat?
>
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: HTTP 1.1 Not Supported

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Richard Sayre [mailto:richardsayre@gmail.com] 
> Subject: Re: HTTP 1.1 Not Supported
> 
> > And what does the access log (or Wireshark trace) show as 
> > being sent by the app on the Pocket PC?
> >
> Using Ethereal I found that Tomcat is sending this error back to my
> Pocket PC application:

Not what I asked; what exactly is the Pocket PC sending to Tomcat?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Richard Sayre <ri...@gmail.com>.
On Dec 5, 2007 2:22 PM, Caldarale, Charles R <Ch...@unisys.com> wrote:
> > From: Richard Sayre [mailto:richardsayre@gmail.com]
> > Subject: HTTP 1.1 Not Supported
> >
> > 2. The pocket pc app tries to obtain a Response object
> > from the request
> > 3. On the line of code that tries to obtain a response
> > I get a server error
>
> Are you referring to the app running on the Pocket PC or the Tomcat app
> responding to the Pocket PC?
>

I get the server Error on the Pocket PC. The Exception message is
"Error on server 505"


> > HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> > Dec 200713:08:21 GMT..Connection: close
>
> And what does the access log (or Wireshark trace) show as being sent by
> the app on the Pocket PC?
>
Using Ethereal I found that Tomcat is sending this error back to my
Pocket PC application:

HTTP/1.1 505 HTTP Version Not Supported
Server: Apache-Coyote/1.1
Date: Tue, 04 Dec 2007 13:08:21 GMT
Connection: close

> > <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> > protocol="HTTP/1.1" redirectPort="8443"/>
>
> That only controls what Tomcat will accept, not what the client sends.
>

I forgot to mention that the Client is using http/1.1  When I
explicitly set the client to use HTTP/1.0 I don't get a server error.
However I need to keep the Pocket PC app using 1.1.


> > I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
>
> You might try an unbundled real Tomcat download, but I doubt if that's
> the problem in this case.
>

I did try this on a stand alone version and it did not work

>  - Chuck

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: HTTP 1.1 Not Supported

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Richard Sayre [mailto:richardsayre@gmail.com] 
> Subject: HTTP 1.1 Not Supported
> 
> 2. The pocket pc app tries to obtain a Response object 
> from the request
> 3. On the line of code that tries to obtain a response
> I get a server error

Are you referring to the app running on the Pocket PC or the Tomcat app
responding to the Pocket PC?

> HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> Dec 200713:08:21 GMT..Connection: close

And what does the access log (or Wireshark trace) show as being sent by
the app on the Pocket PC?

> <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> protocol="HTTP/1.1" redirectPort="8443"/>

That only controls what Tomcat will accept, not what the client sends.

> I am using Tomcat 6.0.14 which came bundled with Netbeans 6.

You might try an unbundled real Tomcat download, but I doubt if that's
the problem in this case.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Martin Gainty <mg...@hotmail.com>.
i agree with chuck's suggestion of using ethereal
another tool which will help determine who or what is changing protocol is
fiddler so you can examine the request and response
http://www.fiddlertool.com/fiddler/

You might want to tracert and
use fiddler to see which (intervening) node is changing the protocol
also if you are able to publish to a public ip we can test it for you

*grasping at straws (part 2)*

HTH/
M-

----- Original Message -----
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Wednesday, December 05, 2007 1:32 PM
Subject: RE: HTTP 1.1 Not Supported


> From: Richard Sayre [mailto:richardsayre@gmail.com]
> Subject: Re: HTTP 1.1 Not Supported
>
> Here is the exact String exported from the packet:
>
> POST /test/sync/upload.jsp?username=test1 HTTP/1.1
> Content-Type: text/xml
> Content-Length: 4005
> Connection: Keep-Alive
> Expect: 100-continue
> Host: 192.168.1.116

Look at it in hex and see if there's something funny in the above lines.
Also check the line terminator for each and verify it's a CR/LF
sequence.

(Grasping at straws here.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: HTTP 1.1 Not Supported

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Richard Sayre [mailto:richardsayre@gmail.com] 
> Subject: Re: HTTP 1.1 Not Supported
> 
> Here is the exact String exported from the packet:
> 
> POST /test/sync/upload.jsp?username=test1 HTTP/1.1
> Content-Type: text/xml
> Content-Length: 4005
> Connection: Keep-Alive
> Expect: 100-continue
> Host: 192.168.1.116

Look at it in hex and see if there's something funny in the above lines.
Also check the line terminator for each and verify it's a CR/LF
sequence.

(Grasping at straws here.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Bill Barker <wb...@wilshire.com>.
"Richard Sayre" <ri...@gmail.com> wrote in message 
news:4a12aaf80712051204j28bbb5ccg4df161a99e550c0c@mail.gmail.com...
> Thank you everyone for all the help I am getting.  I have been doing
> some debugging and it seems that Tomcat is ok.  As I stated earlier
> there is only one piece of code not working, I have other code that is
> successfully getting data from the server.
>
> Here is what I found out using Ethereal:
>
> 1) I am always using POST as my method for getting XML data from the
> web (setting it in the C# object).  But for some reason, unless I
> write data to the request, it uses the GET method (perhaps if the
> object doesn't write data it doesn't see a need to post??).
> 2) The other code that I have that uses POST and writes data to the
> request before receiving a response is receiving 100 Continue from
> Tomcat before it accepted the data from the Pocket PC.

This is normal.  The client asked Tomcat to tell it when it is ready to read 
the data (and Tomcat obliges by sending '100 Continue').  Only then will 
Tomcat attempt to read the body.

> 3) After Tomcat received the data it sent '200 OK' back to the Pocket
> PC and then send the XML data.
> 4) My code that isn't working was not receiving 100 or 200 but was
> still sending the data to the server anyway.
>

And here is the problem.  If Tomcat doesn't send a '100 Continue', then it 
isn't expecting to see the post body.  It is expecting that the next thing 
it reads is the request line for the next request.  What it actually sees is 
the first part of the previous request's post body.  Since this doesn't look 
like a valid request line, it replies with a 505.

This is a bug in the client.  Since it explicitly asked Tomcat to tell it 
when it is ready to read the body (by sending a "Expect: 100-Continue" 
request header), it is supposed to wait for Tomcat to respond before sending 
the body.  This is so that, if Tomcat decides that it doesn't want the body 
(e.g. it is sending back a '401 Unauthorized'), then the client can save 
bandwidth by not sending the body.

A simple Google of '100-continue .net' will give you a bunch of pages about 
how .net has problems in this area.

> I checked the working code vs. the broken code a noticed that the
> working code has 'keepAlive' set to false in my Request object.  I set
> this in my broken code and it worked.  I'm not sure why,  this code is
> over 5 years old and it the first time it has been changed in a while.
> I'm not sure why Tomcat 6 didn't like the way the object behaved with
> keep alive set to true but as long as it works I'm happy.
>

If keepAlive=false, then the client closes the old connection and opens a 
new one.  The old post body disappears into the black hole of the closed 
connection, and the new request on the new connection succeeds.

> Thanks again everyone for your help.
>
>
> Rich
>
> On Dec 5, 2007 4:04 PM, Filip Hanik - Dev Lists <de...@hanik.com> 
> wrote:
>> that looks like a valid request, there most be something else in the
>> data sent over that breaks it
>>
>> there is only one place where tomcat checks for this, its in the
>> Http11Processor
>> you should be able to turn on the debug to get the actual data that
>> tomcat is trying to parse
>>
>> put
>> org.apache.coyote.http11.level = FINE
>> in logging to properties, and Tomcat will print out the data it is
>> trying to parse (see below)
>>
>>         MessageBytes protocolMB = request.protocol();
>>         if (protocolMB.equals(Constants.HTTP_11)) {
>>             http11 = true;
>>             protocolMB.setString(Constants.HTTP_11);
>>         } else if (protocolMB.equals(Constants.HTTP_10)) {
>>             http11 = false;
>>             keepAlive = false;
>>             protocolMB.setString(Constants.HTTP_10);
>>         } else if (protocolMB.equals("")) {
>>             // HTTP/0.9
>>             http09 = true;
>>             http11 = false;
>>             keepAlive = false;
>>         } else {
>>             // Unsupported protocol
>>             http11 = false;
>>             error = true;
>>             // Send 505; Unsupported HTTP version
>>             if (log.isDebugEnabled()) {
>> 
>> log.debug(sm.getString("http11processor.request.prepare")+
>>                           " Unsupported HTTP version 
>> \""+protocolMB+"\"");
>>             }
>>             response.setStatus(505);
>>
>>         }
>>
>>
>> Richard Sayre wrote:
>> > Here is the exact String exported from the packet:
>> >
>> > POST /test/sync/upload.jsp?username=test1 HTTP/1.1
>> > Content-Type: text/xml
>> > Content-Length: 4005
>> > Connection: Keep-Alive
>> > Expect: 100-continue
>> > Host: 192.168.1.116
>> >
>> > On Dec 5, 2007 2:29 PM, Richard Sayre <ri...@gmail.com> wrote:
>> >
>> >> The spacing seems to be ok.  I request several pages using the C#
>> >> object.  The only time I get that error is when I write some data to
>> >> the request before I get the response.  Here is the request String:
>> >>
>> >>
>> >> POST /test/sync/upload.jsp?username=test1 HTTP/1.1
>> >>
>> >>
>> >> On Dec 5, 2007 2:17 PM, Dwebb <d....@dsl.pipex.com> wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> You might want to check the Request line in a tcp capture.  We have 
>> >>> run
>> >>> into a problem recently with the new tomcat bundles that do very 
>> >>> strict
>> >>> checking of the request line.
>> >>>
>> >>> It has to be formatted METHOD SPACE REQUEST_URI SPACE VERSION (ie
>> >>> POST /test HTTP/1.1).  if there are more than one space between the
>> >>> elements you will get a 505 error.
>> >>>
>> >>> see: http://issues.apache.org/bugzilla/show_bug.cgi?id=42750
>> >>>
>> >>> They seem to ignore Appendix B of RFC1945
>> >>> (http://tools.ietf.org/html/rfc1945#page-55)
>> >>>
>> >>> Cheers
>> >>>
>> >>> Danny
>> >>>
>> >>>
>> >>>
>> >>> On Wed, 2007-12-05 at 14:02 -0330, Richard Sayre wrote:
>> >>>
>> >>>> I have a C Sharp Pocket PC application that is hitting a Tomcat web
>> >>>> server and getting some data from that server.  With Tomcat 4.1 this
>> >>>> application is working fine, but since I upgraded to Tomcat 6 it
>> >>>> stopped working.
>> >>>>
>> >>>> Most of the application works with Tomcat 6.  When It does work here
>> >>>> is the scenario:
>> >>>>
>> >>>>
>> >>>> 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
>> >>>> through "POST"
>> >>>> 2. The jsp servlet gets some XML from the model and puts it into a
>> >>>> String and prints it using the output stream
>> >>>> 3. the C# App receives the data ok through a response object
>> >>>>
>> >>>>
>> >>>> When it doesn't work the following occurs:
>> >>>>
>> >>>>
>> >>>> 1.       Pocket Pc requests a page through POST and opens a stream 
>> >>>> and
>> >>>> writes some data to the stream (Some xml data)
>> >>>> 2.       The pocket pc app tries to obtain a Response object from 
>> >>>> the request
>> >>>> 3.       On the line of code that tries to obtain a response I get a
>> >>>> server error
>> >>>>
>> >>>>
>> >>>>
>> >>>> HTTP/1.1 505
>> >>>>
>> >>>> HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
>> >>>> Dec 200713:08:21 GMT..Connection: close
>> >>>>
>> >>>> Which is weird since my connector is as follows:
>> >>>>
>> >>>> <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
>> >>>> protocol="HTTP/1.1" redirectPort="8443"/>
>> >>>>
>> >>>> I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
>> >>>>
>> >>>> Thank you,
>> >>>>
>> >>>> Rich
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To start a new topic, e-mail: users@tomcat.apache.org
>> >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> >>>> For additional commands, e-mail: users-help@tomcat.apache.org
>> >>>>
>> >>>>
>> >>> ---------------------------------------------------------------------
>> >>> To start a new topic, e-mail: users@tomcat.apache.org
>> >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> >>> For additional commands, e-mail: users-help@tomcat.apache.org
>> >>>
>> >>>
>> >>>
>> >
>> > ---------------------------------------------------------------------
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> > For additional commands, e-mail: users-help@tomcat.apache.org
>> >
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Richard Sayre <ri...@gmail.com>.
Thank you everyone for all the help I am getting.  I have been doing
some debugging and it seems that Tomcat is ok.  As I stated earlier
there is only one piece of code not working, I have other code that is
successfully getting data from the server.

Here is what I found out using Ethereal:

1) I am always using POST as my method for getting XML data from the
web (setting it in the C# object).  But for some reason, unless I
write data to the request, it uses the GET method (perhaps if the
object doesn't write data it doesn't see a need to post??).
2) The other code that I have that uses POST and writes data to the
request before receiving a response is receiving 100 Continue from
Tomcat before it accepted the data from the Pocket PC.
3) After Tomcat received the data it sent '200 OK' back to the Pocket
PC and then send the XML data.
4) My code that isn't working was not receiving 100 or 200 but was
still sending the data to the server anyway.

I checked the working code vs. the broken code a noticed that the
working code has 'keepAlive' set to false in my Request object.  I set
this in my broken code and it worked.  I'm not sure why,  this code is
over 5 years old and it the first time it has been changed in a while.
 I'm not sure why Tomcat 6 didn't like the way the object behaved with
keep alive set to true but as long as it works I'm happy.

Thanks again everyone for your help.


Rich

On Dec 5, 2007 4:04 PM, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> that looks like a valid request, there most be something else in the
> data sent over that breaks it
>
> there is only one place where tomcat checks for this, its in the
> Http11Processor
> you should be able to turn on the debug to get the actual data that
> tomcat is trying to parse
>
> put
> org.apache.coyote.http11.level = FINE
> in logging to properties, and Tomcat will print out the data it is
> trying to parse (see below)
>
>         MessageBytes protocolMB = request.protocol();
>         if (protocolMB.equals(Constants.HTTP_11)) {
>             http11 = true;
>             protocolMB.setString(Constants.HTTP_11);
>         } else if (protocolMB.equals(Constants.HTTP_10)) {
>             http11 = false;
>             keepAlive = false;
>             protocolMB.setString(Constants.HTTP_10);
>         } else if (protocolMB.equals("")) {
>             // HTTP/0.9
>             http09 = true;
>             http11 = false;
>             keepAlive = false;
>         } else {
>             // Unsupported protocol
>             http11 = false;
>             error = true;
>             // Send 505; Unsupported HTTP version
>             if (log.isDebugEnabled()) {
>                 log.debug(sm.getString("http11processor.request.prepare")+
>                           " Unsupported HTTP version \""+protocolMB+"\"");
>             }
>             response.setStatus(505);
>
>         }
>
>
> Richard Sayre wrote:
> > Here is the exact String exported from the packet:
> >
> > POST /test/sync/upload.jsp?username=test1 HTTP/1.1
> > Content-Type: text/xml
> > Content-Length: 4005
> > Connection: Keep-Alive
> > Expect: 100-continue
> > Host: 192.168.1.116
> >
> > On Dec 5, 2007 2:29 PM, Richard Sayre <ri...@gmail.com> wrote:
> >
> >> The spacing seems to be ok.  I request several pages using the C#
> >> object.  The only time I get that error is when I write some data to
> >> the request before I get the response.  Here is the request String:
> >>
> >>
> >> POST /test/sync/upload.jsp?username=test1 HTTP/1.1
> >>
> >>
> >> On Dec 5, 2007 2:17 PM, Dwebb <d....@dsl.pipex.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> You might want to check the Request line in a tcp capture.  We have run
> >>> into a problem recently with the new tomcat bundles that do very strict
> >>> checking of the request line.
> >>>
> >>> It has to be formatted METHOD SPACE REQUEST_URI SPACE VERSION (ie
> >>> POST /test HTTP/1.1).  if there are more than one space between the
> >>> elements you will get a 505 error.
> >>>
> >>> see: http://issues.apache.org/bugzilla/show_bug.cgi?id=42750
> >>>
> >>> They seem to ignore Appendix B of RFC1945
> >>> (http://tools.ietf.org/html/rfc1945#page-55)
> >>>
> >>> Cheers
> >>>
> >>> Danny
> >>>
> >>>
> >>>
> >>> On Wed, 2007-12-05 at 14:02 -0330, Richard Sayre wrote:
> >>>
> >>>> I have a C Sharp Pocket PC application that is hitting a Tomcat web
> >>>> server and getting some data from that server.  With Tomcat 4.1 this
> >>>> application is working fine, but since I upgraded to Tomcat 6 it
> >>>> stopped working.
> >>>>
> >>>> Most of the application works with Tomcat 6.  When It does work here
> >>>> is the scenario:
> >>>>
> >>>>
> >>>> 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
> >>>> through "POST"
> >>>> 2. The jsp servlet gets some XML from the model and puts it into a
> >>>> String and prints it using the output stream
> >>>> 3. the C# App receives the data ok through a response object
> >>>>
> >>>>
> >>>> When it doesn't work the following occurs:
> >>>>
> >>>>
> >>>> 1.       Pocket Pc requests a page through POST and opens a stream and
> >>>> writes some data to the stream (Some xml data)
> >>>> 2.       The pocket pc app tries to obtain a Response object from the request
> >>>> 3.       On the line of code that tries to obtain a response I get a
> >>>> server error
> >>>>
> >>>>
> >>>>
> >>>> HTTP/1.1 505
> >>>>
> >>>> HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> >>>> Dec 200713:08:21 GMT..Connection: close
> >>>>
> >>>> Which is weird since my connector is as follows:
> >>>>
> >>>> <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> >>>> protocol="HTTP/1.1" redirectPort="8443"/>
> >>>>
> >>>> I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
> >>>>
> >>>> Thank you,
> >>>>
> >>>> Rich
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To start a new topic, e-mail: users@tomcat.apache.org
> >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>
> >>>>
> >>> ---------------------------------------------------------------------
> >>> To start a new topic, e-mail: users@tomcat.apache.org
> >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>
> >>>
> >>>
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
that looks like a valid request, there most be something else in the 
data sent over that breaks it

there is only one place where tomcat checks for this, its in the 
Http11Processor
you should be able to turn on the debug to get the actual data that 
tomcat is trying to parse

put
org.apache.coyote.http11.level = FINE
in logging to properties, and Tomcat will print out the data it is 
trying to parse (see below)

        MessageBytes protocolMB = request.protocol();
        if (protocolMB.equals(Constants.HTTP_11)) {
            http11 = true;
            protocolMB.setString(Constants.HTTP_11);
        } else if (protocolMB.equals(Constants.HTTP_10)) {
            http11 = false;
            keepAlive = false;
            protocolMB.setString(Constants.HTTP_10);
        } else if (protocolMB.equals("")) {
            // HTTP/0.9
            http09 = true;
            http11 = false;
            keepAlive = false;
        } else {
            // Unsupported protocol
            http11 = false;
            error = true;
            // Send 505; Unsupported HTTP version
            if (log.isDebugEnabled()) {
                log.debug(sm.getString("http11processor.request.prepare")+
                          " Unsupported HTTP version \""+protocolMB+"\"");
            }
            response.setStatus(505);
        }


Richard Sayre wrote:
> Here is the exact String exported from the packet:
>
> POST /test/sync/upload.jsp?username=test1 HTTP/1.1
> Content-Type: text/xml
> Content-Length: 4005
> Connection: Keep-Alive
> Expect: 100-continue
> Host: 192.168.1.116
>
> On Dec 5, 2007 2:29 PM, Richard Sayre <ri...@gmail.com> wrote:
>   
>> The spacing seems to be ok.  I request several pages using the C#
>> object.  The only time I get that error is when I write some data to
>> the request before I get the response.  Here is the request String:
>>
>>
>> POST /test/sync/upload.jsp?username=test1 HTTP/1.1
>>
>>
>> On Dec 5, 2007 2:17 PM, Dwebb <d....@dsl.pipex.com> wrote:
>>     
>>> Hi,
>>>
>>> You might want to check the Request line in a tcp capture.  We have run
>>> into a problem recently with the new tomcat bundles that do very strict
>>> checking of the request line.
>>>
>>> It has to be formatted METHOD SPACE REQUEST_URI SPACE VERSION (ie
>>> POST /test HTTP/1.1).  if there are more than one space between the
>>> elements you will get a 505 error.
>>>
>>> see: http://issues.apache.org/bugzilla/show_bug.cgi?id=42750
>>>
>>> They seem to ignore Appendix B of RFC1945
>>> (http://tools.ietf.org/html/rfc1945#page-55)
>>>
>>> Cheers
>>>
>>> Danny
>>>
>>>
>>>
>>> On Wed, 2007-12-05 at 14:02 -0330, Richard Sayre wrote:
>>>       
>>>> I have a C Sharp Pocket PC application that is hitting a Tomcat web
>>>> server and getting some data from that server.  With Tomcat 4.1 this
>>>> application is working fine, but since I upgraded to Tomcat 6 it
>>>> stopped working.
>>>>
>>>> Most of the application works with Tomcat 6.  When It does work here
>>>> is the scenario:
>>>>
>>>>
>>>> 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
>>>> through "POST"
>>>> 2. The jsp servlet gets some XML from the model and puts it into a
>>>> String and prints it using the output stream
>>>> 3. the C# App receives the data ok through a response object
>>>>
>>>>
>>>> When it doesn't work the following occurs:
>>>>
>>>>
>>>> 1.       Pocket Pc requests a page through POST and opens a stream and
>>>> writes some data to the stream (Some xml data)
>>>> 2.       The pocket pc app tries to obtain a Response object from the request
>>>> 3.       On the line of code that tries to obtain a response I get a
>>>> server error
>>>>
>>>>
>>>>
>>>> HTTP/1.1 505
>>>>
>>>> HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
>>>> Dec 200713:08:21 GMT..Connection: close
>>>>
>>>> Which is weird since my connector is as follows:
>>>>
>>>> <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
>>>> protocol="HTTP/1.1" redirectPort="8443"/>
>>>>
>>>> I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
>>>>
>>>> Thank you,
>>>>
>>>> Rich
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>       
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Richard Sayre <ri...@gmail.com>.
Here is the exact String exported from the packet:

POST /test/sync/upload.jsp?username=test1 HTTP/1.1
Content-Type: text/xml
Content-Length: 4005
Connection: Keep-Alive
Expect: 100-continue
Host: 192.168.1.116

On Dec 5, 2007 2:29 PM, Richard Sayre <ri...@gmail.com> wrote:
> The spacing seems to be ok.  I request several pages using the C#
> object.  The only time I get that error is when I write some data to
> the request before I get the response.  Here is the request String:
>
>
> POST /test/sync/upload.jsp?username=test1 HTTP/1.1
>
>
> On Dec 5, 2007 2:17 PM, Dwebb <d....@dsl.pipex.com> wrote:
> > Hi,
> >
> > You might want to check the Request line in a tcp capture.  We have run
> > into a problem recently with the new tomcat bundles that do very strict
> > checking of the request line.
> >
> > It has to be formatted METHOD SPACE REQUEST_URI SPACE VERSION (ie
> > POST /test HTTP/1.1).  if there are more than one space between the
> > elements you will get a 505 error.
> >
> > see: http://issues.apache.org/bugzilla/show_bug.cgi?id=42750
> >
> > They seem to ignore Appendix B of RFC1945
> > (http://tools.ietf.org/html/rfc1945#page-55)
> >
> > Cheers
> >
> > Danny
> >
> >
> >
> > On Wed, 2007-12-05 at 14:02 -0330, Richard Sayre wrote:
> > > I have a C Sharp Pocket PC application that is hitting a Tomcat web
> > > server and getting some data from that server.  With Tomcat 4.1 this
> > > application is working fine, but since I upgraded to Tomcat 6 it
> > > stopped working.
> > >
> > > Most of the application works with Tomcat 6.  When It does work here
> > > is the scenario:
> > >
> > >
> > > 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
> > > through "POST"
> > > 2. The jsp servlet gets some XML from the model and puts it into a
> > > String and prints it using the output stream
> > > 3. the C# App receives the data ok through a response object
> > >
> > >
> > > When it doesn't work the following occurs:
> > >
> > >
> > > 1.       Pocket Pc requests a page through POST and opens a stream and
> > > writes some data to the stream (Some xml data)
> > > 2.       The pocket pc app tries to obtain a Response object from the request
> > > 3.       On the line of code that tries to obtain a response I get a
> > > server error
> > >
> > >
> > >
> > > HTTP/1.1 505
> > >
> > > HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> > > Dec 200713:08:21 GMT..Connection: close
> > >
> > > Which is weird since my connector is as follows:
> > >
> > > <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> > > protocol="HTTP/1.1" redirectPort="8443"/>
> > >
> > > I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
> > >
> > > Thank you,
> > >
> > > Rich
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@tomcat.apache.org
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Richard Sayre <ri...@gmail.com>.
The spacing seems to be ok.  I request several pages using the C#
object.  The only time I get that error is when I write some data to
the request before I get the response.  Here is the request String:


POST /test/sync/upload.jsp?username=test1 HTTP/1.1

On Dec 5, 2007 2:17 PM, Dwebb <d....@dsl.pipex.com> wrote:
> Hi,
>
> You might want to check the Request line in a tcp capture.  We have run
> into a problem recently with the new tomcat bundles that do very strict
> checking of the request line.
>
> It has to be formatted METHOD SPACE REQUEST_URI SPACE VERSION (ie
> POST /test HTTP/1.1).  if there are more than one space between the
> elements you will get a 505 error.
>
> see: http://issues.apache.org/bugzilla/show_bug.cgi?id=42750
>
> They seem to ignore Appendix B of RFC1945
> (http://tools.ietf.org/html/rfc1945#page-55)
>
> Cheers
>
> Danny
>
>
>
> On Wed, 2007-12-05 at 14:02 -0330, Richard Sayre wrote:
> > I have a C Sharp Pocket PC application that is hitting a Tomcat web
> > server and getting some data from that server.  With Tomcat 4.1 this
> > application is working fine, but since I upgraded to Tomcat 6 it
> > stopped working.
> >
> > Most of the application works with Tomcat 6.  When It does work here
> > is the scenario:
> >
> >
> > 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
> > through "POST"
> > 2. The jsp servlet gets some XML from the model and puts it into a
> > String and prints it using the output stream
> > 3. the C# App receives the data ok through a response object
> >
> >
> > When it doesn't work the following occurs:
> >
> >
> > 1.       Pocket Pc requests a page through POST and opens a stream and
> > writes some data to the stream (Some xml data)
> > 2.       The pocket pc app tries to obtain a Response object from the request
> > 3.       On the line of code that tries to obtain a response I get a
> > server error
> >
> >
> >
> > HTTP/1.1 505
> >
> > HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> > Dec 200713:08:21 GMT..Connection: close
> >
> > Which is weird since my connector is as follows:
> >
> > <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> > protocol="HTTP/1.1" redirectPort="8443"/>
> >
> > I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
> >
> > Thank you,
> >
> > Rich
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Dwebb <d....@dsl.pipex.com>.
Hi,

You might want to check the Request line in a tcp capture.  We have run
into a problem recently with the new tomcat bundles that do very strict
checking of the request line.

It has to be formatted METHOD SPACE REQUEST_URI SPACE VERSION (ie
POST /test HTTP/1.1).  if there are more than one space between the
elements you will get a 505 error.

see: http://issues.apache.org/bugzilla/show_bug.cgi?id=42750

They seem to ignore Appendix B of RFC1945
(http://tools.ietf.org/html/rfc1945#page-55)

Cheers

Danny


On Wed, 2007-12-05 at 14:02 -0330, Richard Sayre wrote:
> I have a C Sharp Pocket PC application that is hitting a Tomcat web
> server and getting some data from that server.  With Tomcat 4.1 this
> application is working fine, but since I upgraded to Tomcat 6 it
> stopped working.
> 
> Most of the application works with Tomcat 6.  When It does work here
> is the scenario:
> 
> 
> 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
> through "POST"
> 2. The jsp servlet gets some XML from the model and puts it into a
> String and prints it using the output stream
> 3. the C# App receives the data ok through a response object
> 
> 
> When it doesn't work the following occurs:
> 
> 
> 1.       Pocket Pc requests a page through POST and opens a stream and
> writes some data to the stream (Some xml data)
> 2.       The pocket pc app tries to obtain a Response object from the request
> 3.       On the line of code that tries to obtain a response I get a
> server error
> 
> 
> 
> HTTP/1.1 505
> 
> HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> Dec 200713:08:21 GMT..Connection: close
> 
> Which is weird since my connector is as follows:
> 
> <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> protocol="HTTP/1.1" redirectPort="8443"/>
> 
> I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
> 
> Thank you,
> 
> Rich
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Richard Sayre <ri...@gmail.com>.
On Dec 5, 2007 2:28 PM, Martin Gainty <mg...@hotmail.com> wrote:
> did you verify protocol is set to HTTP 1.1 (at least not set to 1.0)
> default non-ssl connector in $CATALINA_HOME/conf/server.xml?

This is my non ssl connector in server.xml:

 <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
protocol="HTTP/1.1" redirectPort="8443"/>

The ssl connector is commented out.


> did you verify that Port 80 redirects to connector configured for 8084?

I am hitting port 8084 directly

> did you verify the connector is live and listening on 8084?

Yes, I can hit the web app through my browser.  Also other part of my
PPC app download info from the server with out any errors.

> are there any other intervening webservers, firewalls or nat-servers?

No my dev environment is on my computer.  I hit a production server
(Tomcat 4.1) for testing purposes which was behind a firewall and it
worked fine.

>
> M--
> ----- Original Message -----
> From: "Richard Sayre" <ri...@gmail.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Wednesday, December 05, 2007 12:32 PM
> Subject: HTTP 1.1 Not Supported
>
>
>
> > I have a C Sharp Pocket PC application that is hitting a Tomcat web
> > server and getting some data from that server.  With Tomcat 4.1 this
> > application is working fine, but since I upgraded to Tomcat 6 it
> > stopped working.
> >
> > Most of the application works with Tomcat 6.  When It does work here
> > is the scenario:
> >
> >
> > 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
> > through "POST"
> > 2. The jsp servlet gets some XML from the model and puts it into a
> > String and prints it using the output stream
> > 3. the C# App receives the data ok through a response object
> >
> >
> > When it doesn't work the following occurs:
> >
> >
> > 1.       Pocket Pc requests a page through POST and opens a stream and
> > writes some data to the stream (Some xml data)
> > 2.       The pocket pc app tries to obtain a Response object from the
> request
> > 3.       On the line of code that tries to obtain a response I get a
> > server error
> >
> >
> >
> > HTTP/1.1 505
> >
> > HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> > Dec 200713:08:21 GMT..Connection: close
> >
> > Which is weird since my connector is as follows:
> >
> > <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> > protocol="HTTP/1.1" redirectPort="8443"/>
> >
> > I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
> >
> > Thank you,
> >
> > Rich
> >
>
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP 1.1 Not Supported

Posted by Martin Gainty <mg...@hotmail.com>.
did you verify protocol is set to HTTP 1.1 (at least not set to 1.0)
default non-ssl connector in $CATALINA_HOME/conf/server.xml?
did you verify that Port 80 redirects to connector configured for 8084?
did you verify the connector is live and listening on 8084?
are there any other intervening webservers, firewalls or nat-servers?

M--
----- Original Message -----
From: "Richard Sayre" <ri...@gmail.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Wednesday, December 05, 2007 12:32 PM
Subject: HTTP 1.1 Not Supported


> I have a C Sharp Pocket PC application that is hitting a Tomcat web
> server and getting some data from that server.  With Tomcat 4.1 this
> application is working fine, but since I upgraded to Tomcat 6 it
> stopped working.
>
> Most of the application works with Tomcat 6.  When It does work here
> is the scenario:
>
>
> 1. My C# app sends a request to /webapp/getCustomers.jsp?custId=1
> through "POST"
> 2. The jsp servlet gets some XML from the model and puts it into a
> String and prints it using the output stream
> 3. the C# App receives the data ok through a response object
>
>
> When it doesn't work the following occurs:
>
>
> 1.       Pocket Pc requests a page through POST and opens a stream and
> writes some data to the stream (Some xml data)
> 2.       The pocket pc app tries to obtain a Response object from the
request
> 3.       On the line of code that tries to obtain a response I get a
> server error
>
>
>
> HTTP/1.1 505
>
> HTTP Version Not Supported..Server: Apache-Coyote/1.1..Date: Tue, 04
> Dec 200713:08:21 GMT..Connection: close
>
> Which is weird since my connector is as follows:
>
> <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084"
> protocol="HTTP/1.1" redirectPort="8443"/>
>
> I am using Tomcat 6.0.14 which came bundled with Netbeans 6.
>
> Thank you,
>
> Rich
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org