[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
Issue Type: Bug Bug
Assignee: Unassigned
Components: HTTP
Created: 09/Jul/12 7:15 AM
Description:

If the http request contain an url without trailing slash, the Jetty returns error 400. I.e.

POST http://192.168.13.81:8082/ HTTP/1.0

works fine, but

POST http://192.168.13.81:8082 HTTP/1.0

fails.

I've tried to replace the tomcat by jetty, but I cannot do it because of the issue.

Project: Jetty
Priority: Blocker Blocker
Reporter: Anatoly Kupriyanov
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org

This is line which throws the 400 error:

protected void handleRequest() throws IOException
    {
        if (_server.isRunning())
        {
            boolean retrying = false;
            boolean error = false;
            String threadName = null;
            String info=null;
            try
            {
                info = URIUtil.canonicalPath(_uri.getDecodedPath());
                if (info == null)
                    throw new HttpException(400);
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Change By: Greg Wilkins (09/Jul/12 1:52 PM)
Priority: Blocker Major
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Greg Wilkins commented on Bug JETTY-1533

RFC2616 says in section 5.1.2:

Note that the absolute path cannot be empty; if none is present in the original URI, it MUST be given as "/"

Furthermore, I don't think that absolute URLs are valid in HTTP/1.0 unless it is a proxy request?

So this is really an issue with the client and or proxy that you are using. What is the client? Also what jetty version and connector are you using?

However, I'm not opposed to looking at adding an option to automatically convert empty path to /. But as we've never had complaints before, I'd like to know a bit more about the use-case before we make such a change.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

I've tried all latest versions of jetty 6, 7 and 8.

Maybe you are right. The client is invalid or at least unusual case, it is some third party system to which I have no access, I think it something proprietary.

However the quote you are referring is unrelated I think, it says about an absolute path, not about an absolute url. Please refer to the RFC2616 (3.2.3):

  • An empty abs_path is equivalent to an abs_path of "/".
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Change By: Jan Bartel (02/Aug/12 1:33 AM)
Assignee: Greg Wilkins
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Greg Wilkins commented on Bug JETTY-1533

I've pushed a test and a fix for this to the jetty-7 SNAPSHOT branch. It checks to see if the URI is in the form scheme://host and if so adds a / path.
This will be in the next 7 and 8 releases.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Greg Wilkins resolved Bug JETTY-1533 as Fixed
Change By: Greg Wilkins (02/Aug/12 4:05 AM)
Resolution: Fixed
Status: Open Resolved
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

Session handler has an issue with these URLs

Change By: Greg Wilkins (12/Dec/12 2:35 PM)
Status: Resolved Reopened
Resolution: Fixed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1533) Jetty returns 400 if url doesn't have trailing slash.

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Jan Bartel closed Bug JETTY-1533 as Duplicate

This issue has been moved to jetty eclipse bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396566

Change By: Jan Bartel (13/Dec/12 9:48 PM)
Resolution: Duplicate
Status: Reopened Closed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email