3

I have a request that contains a If-None-Match header that I then compare to the calculated response on the service. If they match and the response hasn't been modified since last I return an empty 304 response.

All this works fine as my content rarely changes but I like to check for changes often.

This however seems to become a problem when exposing the service resource via Service Bus Relay. I don't receive a response at the relay endpoint when sending of a 304 from the service.

Is this a known problem? Is there a way around it as you see it?

Riri
  • 11,501
  • 14
  • 63
  • 88

1 Answers1

5

This appears to be a bug in ServiceBus Relay. When your listener is returning 304 (or 204) make sure the HttpResponseMessageProperty..StatusDescription is null before sending the response back through SERVICEBUS and that should work-around this issue.

Dave Stucki
  • 121
  • 3
  • Great. I can confirm that this work around actually works! I couldn't get the [CheckConditionalRetrieve](http://msdn.microsoft.com/en-us/library/system.servicemodel.web.incomingwebrequestcontext.checkconditionalretrieve.aspx) method to work but had to implement the etag store and comparison myself to be able to modify the response before going out. – Riri Mar 06 '13 at 17:24
  • @dave-stucki-ms I guess this is specifically for API 1.8 of Service Bus? Could you please clarify that in you answer for future reference? – Riri Mar 07 '13 at 10:29