private static HttpResponsePacket CreateResponsePacketFromMessage(HttpResponseMessage responseMsg, IRestBusSubscriber subscriber) { //TODO: Confirm that commas in response headers are merged properly into packet header //It seems like header folding behavior in ToHttpResponsePacket() is wrong //AddHeader("One, Two") //AddHeader(["Three", "Four"]) //Should not return //"One, Two" //"Three, Four" in the output //It should be: //"One, Two" //"Three" //"Four" var responsePkt = responseMsg.ToHttpResponsePacket(); //Add/Update Subscriber-Id header responsePkt.Headers[Common.Shared.SUBSCRIBER_ID_HEADER] = new string[] { subscriber == null ? String.Empty : subscriber.Id ?? String.Empty }; return responsePkt; }
private static HttpResponsePacket CreateResponsePacketFromMessage(HttpResponseMessage responseMsg, IRestBusSubscriber subscriber) { var responsePkt = responseMsg.ToHttpResponsePacket(); //Add/Update Server header responsePkt.Headers["Server"] = HTTP_RESPONSE_SERVER_HEADER; return responsePkt; }
private static HttpResponsePacket CreateResponsePacketFromMessage(HttpResponseMessage responseMsg, IRestBusSubscriber subscriber) { //TODO: Confirm that commas in response headers are merged properly into packet header var responsePkt = responseMsg.ToHttpResponsePacket(); //Add/Update Subscriber-Id header responsePkt.Headers[Common.Shared.SUBSCRIBER_ID_HEADER] = new string[] { subscriber == null ? String.Empty : subscriber.Id ?? String.Empty }; return responsePkt; }