Home › Forums › Integration › SOA Implementations › Rest Response Header "Expires" Attribute
Tagged: Rest
- This topic has 3 replies, 2 voices, and was last updated 5 years, 2 months ago by Ed Shaw.
-
AuthorPosts
-
-
September 23, 2019 at 11:58 am #12217Eric SchattschneiderParticipant
Hello – I am writing a new rest service. I am having an issue when the response is coming back and I am thinking it is coming from the Expires attribute in the response header. Right now it is coming back from the service call as zero and Nexj framwork is throwing an Invalid HTTP data error (unparseable date: 0). Is there a way I can find that out for sure? Also is there a way around this as we don’t care about this? Thanks
0 -
September 23, 2019 at 3:24 pm #12228Ed ShawKeymaster
We changed the behavior for handling invalid dates in headers in 8.9 and above. (JIRA Enterprise CRM-ECRM-27459) This is based on https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html which says that a value of “0” (which fails date validation) can be expected in some cases.
From section “14.21 Expires”: HTTP/1.1 clients and caches MUST treat other invalid date formats, especially including the value “0”, as in the past (i.e., “already expired”).
For the time being, until you upgrade, can you strip the header out before you receive it with some intermediary?
Otherwise, if you set the “error” property on your receiving channel to #f can you receive the message into your service as “this” and deal with it there? I don’t have pre-8.9 on my system to test. I feel that maybe the error will be thrown to soon to handle, but worth a try.
Cheers,
Ed
0 -
September 23, 2019 at 3:52 pm #12237Eric SchattschneiderParticipant
If I turn on the HTTPClient logger you can see the response coming in. Looking at the error property on the channel and doing what you suggested is not having any affect. I think error is being thrown too soon after response is coming back into the “Black Box”. Will play with that channel a thing a bit more but we may be stuck for time being. Any other thoughts?
0 -
September 24, 2019 at 11:40 am #12249Ed ShawKeymaster
If the error is thrown too soon (sounds like that’s the case) your options are to pre-process the response outside of the server (i.e. have an intermediate processor that strips out the Expires header) or wait for an 8.9 or higher version of the server to do this work.
0
-
-
AuthorPosts
- You must be logged in to reply to this topic.