ask to change header in api response
Hello Maybe a stupid request, but i realized that the header of events and api responses differs a bit. Exactly the order of Content-Length and Content-Type headers are different. I would like to ask to unify this, because it would help me a lot in parsing the data in the socket. Please review the attached small patch if possible. Thanks in advance, Tamas Index: src/mod/event_handlers/mod_event_socket/mod_event_socket.c =================================================================== --- src/mod/event_handlers/mod_event_socket/mod_event_socket.c (revision 5646) +++ src/mod/event_handlers/mod_event_socket/mod_event_socket.c (working copy) @@ -551,7 +551,7 @@ switch_size_t rlen, blen; char buf[1024] = ""; rlen = strlen(reply); - snprintf(buf, sizeof(buf), "Content-Type: api/response\nContent-Length: %" SWITCH_SSIZE_T_FMT "\n\n", rlen); + snprintf(buf, sizeof(buf), "Content-Length: %" SWITCH_SSIZE_T_FMT "\nContent-Type: api/response\n\n", rlen); blen = strlen(buf); switch_socket_send(acs->listener->sock, buf, &blen); switch_socket_send(acs->listener->sock, reply, &rlen);
participants (1)
-
Tamas Cseke