Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] how to get the request header's specified field and add it to the URI?

hi,all.
I give the specified request header to jetty server,how can I get this specified field and add it to the URI?

For example:
Request header:

GET /hello/test.txt HTTP/1.1
User-Agent: curl/7.21.3
Host: localhost
Accept: */*
Hash:234

As you can see,this request header has a specified field "Hash",the URI is "/hello/test.txt".

I want to rewrite this URI to "/234/hello/test.txt"(i.e.: the new URI is : /Hash/oldURI )

I googled the sites,and find this page(http://api.dpml.net/org/mortbay/jetty/6.1.0/org/mortbay/jetty/Request.html#getHeader(java.lang.String))
Jetty7 hasn't this class,so how should I get the specified request header field and rewrite the request URI?

Is jetty-rewirte.xml can do this? How to add this rule?

Thank you!

Back to the top