pavanreddyboppidi / rest-client

Automatically exported from code.google.com/p/rest-client
Apache License 2.0
0 stars 0 forks source link

Client automatically follows to new location #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a resource on a web-service send a 301 or 303 response with new
location for the same resource
2. Have REST client do a GET on the old resource URI
3. Observe REST client automatically follows to the new resource

What is the expected output? What do you see instead?
I'd thought I'd see the 301 or 303 header response, as opening a Telnet
session to the web-service does

What version of the product are you using? On what operating system?
2.3 on Windows XP

Please provide any additional information below.
Hope this is not a dup or a misreading of some manual somewhere or behavior
by design (in which case I think this behavior should be a preference). I
couldn't find similar issues. Cheers, keep up the good work! :-)

Original issue reported on code.google.com by drvdijk on 13 Oct 2009 at 7:09

GoogleCodeExporter commented 9 years ago
<quote>I think this behavior should be a preference</quote>

Let me see if I can make it a preference.

Original comment by subwiz on 15 Oct 2009 at 8:38

GoogleCodeExporter commented 9 years ago
<Self-notes for implementing @ home>

The redirect handler is available here:

http://hc.apache.org/httpcomponents-client/httpclient/apidocs/org/apache/http/im
pl/client/DefaultRedirectHandler.html

I have to override the method isRedirectRequested() and return always false in 
cases
where preference is set to *No redirect*.

Original comment by subwiz on 15 Oct 2009 at 9:21

GoogleCodeExporter commented 9 years ago
Revision 435 has the requested change in lib module. UI module needs to be 
updated.

Original comment by subwiz on 15 Oct 2009 at 3:22

GoogleCodeExporter commented 9 years ago
Note: instead of storing this value as a global preference, I am setting it per-
request. This will allow finer level of control, and will allow us to write 
repeatable tests.

Original comment by subwiz on 15 Oct 2009 at 3:26

GoogleCodeExporter commented 9 years ago
Rev: 436 has the UI changes.

Original comment by subwiz on 15 Oct 2009 at 4:40

GoogleCodeExporter commented 9 years ago
I am also noticing this behavior. I am using a Central Authentication Service 
(CAS),
which normally redirects the browser to the service/app endpoint after a 
successful
login. Instead, I would like to use the UI client view/intercept the CAS 
response (to
get its headers, including location) before being redirected to the service 
endpoint.

Comment #4 & #5 makes it sound like this feature is already possible, but I 
don't see
it or any documentation for it. Seems like a preference option "No Redirect" 
would
make sense here.

Note: I am using RESTClient 2.3

Original comment by steven.o...@gmail.com on 22 Dec 2009 at 12:01