Hi - > Although unlikely the MHD_add_response_header can fail for > various reasons. If it fails something odd is going on. > So check we can actually add a response header and log an > error if we cannot.
Sure, if you insist. :-) except: > - *size = os.size(); > - MHD_add_response_header (r, "Content-Type", "text/plain"); > + if (r != NULL) > + { > + *size = os.size(); > + add_mhd_response_header (r, "Content-Type", "text/plain"); > + } Why move the *size assignment in there? > - *size = version.size (); > - MHD_add_response_header (r, "Content-Type", "text/plain"); > + if (r != NULL) > + { > + *size = version.size (); > + add_mhd_response_header (r, "Content-Type", "text/plain"); > + } > return r; > } ditto? - FChE