gsoap 2.8.135 stable
Issue with using http_extra_header with certain plugins
The databinding test case report Segmentation fault is executed in Ubuntu22.04
Thanks for reporting. The address.cpp demo example application has a missing allocation for the DOB field. The code that takes the DOB in address.cpp:166 should be: // change soap_s2dateTime to soap_xsd__dateTime when overriding the default xsd:dateTime to time_t mapping if (*(s = user_input("DOB"))) { a->dob = soap_new_dateTime(soap); if (soap_s2dateTime(soap, s, a->dob) != SOAP_OK) std::cerr << "Not a valid ISO 8601 date time (ignored)" << std::endl; } Otherwise, a->dob is null and that leads to...
Issue with using http_extra_header with certain plugins
This modification should work, I've tested with various examples including incorrect ones (which won't show up as a header): if (soap->http_extra_header) { const char *header = soap->http_extra_header; soap->http_extra_header = NULL; /* use http_extra_header once (assign new value before each call) */ while (*header) { const char *s = strchr(header, ':'); const char *t = strchr(header, '\n'); if (t == NULL) t = header + strlen(header); if (s != NULL && s < t && t < header + sizeof(soap->tmpbuf))...
Issue with using http_extra_header with certain plugins
Thanks for the feedback. The problem is that the extra header is allowed to contain more than one header string i.e. with \r\n separators. This won't work woth the fposthdr callback. That's why it differs. And yes, it is a bit ugly. Your suggestion to use a loop over the strings could work to use fposthder.