Hi Ben,

You can also try with different Restlet HTTP client connector. Otherwise, a
reproducible test case would help us to pinpoint the issue. Feel free to
open a defect report in the tracker.

Best regards,
Jerome


2007/12/6, Stephan Koops <[EMAIL PROTECTED]>:
>
> Hello Ben,
>
> do you checked, if the header reaches the server, for example with the
> ethereal (http://www.ethereal.com/
> <http://www.ethereal.com/distribution/win32/>). On windows you need to
> install an API called Wincap, if I remember right. Look at the web page
> of ethereal.
>
> regards
>    Stephan
>
> Ben schrieb:
> > I'm writing a small REST client to use for testing my REST server app.
> The
> > relevant code looks something like this:
> >
> > Client client = new Client(Protocol.HTTP);
> > Request request = new Request();
> >
> > // build request from UI input
> > // ...
> > // add any header fields defined by user
> > // one of these is "X-Target-Location"
> > request.getAttributes().put(headerName, headerValue);
> >
> > // Send request to server
> > Response response = client.handle(request);
> >
> >
> > My problem:
> > In the server code, when the request arrives, and my custom Resource is
> invoked
> > to handle it, not all of the HTTP headers from the request are present.
> I
> > expected the following Form to include all headers added in the client
> above:
> >
> > (Form) getRequest().getAttributes().get("org.restlet.http.headers");
> >
> > It includes various standard HTTP headers, but not the custom
> > "X-Target-Location" header. I also stepped through everything in
> > getRequest().getAttributes() but don't see it hiding anywhere else ...
> >
> > What happens to custom HTTP headers, and where can I find them?
> >
> > Note, please, that I tested the server using a different client and the
> custom
> > header came through fine there. This leads me to believe that my error
> is in the
> > client Request code, but I don't know where?
> >
> > Thank you,
> > Ben.
> >
> >
>

Reply via email to