Home Forums Integration SOA Implementations Rest Response Header "Expires" Attribute

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #12217

      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
    • #12228
      Ed ShawEd Shaw
      Keymaster

      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
    • #12237

      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
    • #12249
      Ed ShawEd Shaw
      Keymaster

      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
Viewing 3 reply threads
  • You must be logged in to reply to this topic.