[xep-support] Displaying images from sites with https redirects

From: Bob Cirilli <bob.cirilli@enetrix.com>
Date: Thu Sep 07 2006 - 09:28:48 PDT

Hello,

 

I apologize in advance if this gets too long winded, but hopefully more
information will be useful here.

 

This is our problem: Some of the websites that we are using renderX
have redirects that take the user from regular http (port 80) to http
with SSL (port 443). This works fine with web browsers, because they
know when requesting something (a page, an image, etc...) that they
should follow the redirect, and if a problem comes up, they ask the
user. The problem comes in when we link to an image and attempt to
display it with XEP. We receive an http response status of 302,
indicating that the agent was waiting for user input (which obviously
never comes, and the image never displays). Is there anyway that we can
bypass this behavior so that the redirect will work correctly and our
image will display?

 

I have included an example as well as a description of http response
status 302 below.

I'm kind of stumped on this one. Any help you can offer would be
greatly appreciated.

 

Thank you,

 

Bob Cirilli

eNetrix

bob.cirilli@enetrix.com

 

 

 

 

 

 

Here is an example with an image on the problem domain:

 

http://ashhra.enetrix.com/pls/flexd/object_utils.display_object?id=29440
64

 

Try opening it in a web browser, and you should be presented with a
dialogue that says something like "This page contains both secure and
non-secure items. Do you want to display the non-secure items?"

 

However, when we add this same image into an external-graphic element in
FO, we get an error:

 

<fo:external-graphic scaling="uniform"
src="url(http://ashhra.enetrix.com/pls/flexd/object_utils.display_object
?id=2944064)"/>

 

The error is: [warning] Could not retrieve image from
'http://ashhra.enetrix.com/pls/flexd/object_utils.display_object?id=2944
06': java.io.IOException: HTTP response status is 302.

 

 

Looking up HTTP Response status 302 on W3C shows:

 

302 Found

The requested resource resides temporarily under a different URI. Since
the redirection might be altered on occasion, the client SHOULD continue
to use the Request-URI for future requests. This response is only
cacheable if indicated by a Cache-Control or Expires header field.

The temporary URI SHOULD be given by the Location field in the response.
Unless the request method was HEAD, the entity of the response SHOULD
contain a short hypertext note with a hyperlink to the new URI(s).

If the 302 status code is received in response to a request other than
GET or HEAD, the user agent MUST NOT automatically redirect the request
unless it can be confirmed by the user, since this might change the
conditions under which the request was issued.

 

 

 

 

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Thu Sep 7 09:50:59 2006

This archive was generated by hypermail 2.1.8 : Thu Sep 07 2006 - 09:51:03 PDT