- p = z_get_HTTP_Response(o, 200);
- hres = p->u.HTTP_Response;
- ret = z_soap_codec_enc(assoc->encode, &soap_package,
- &hres->content_buf, &hres->content_len,
- soap_handlers, charset);
- hres->code = http_code;
- if (!charset)
- z_HTTP_header_add(o, &hres->headers, "Content-Type", "text/xml");
- else
- {
- char ctype[60];
- strcpy(ctype, "text/xml; charset=");
- strcat(ctype, charset);
- z_HTTP_header_add(o, &hres->headers, "Content-Type", ctype);
- }
+ if (http_code == 200 || http_code == 500)
+ {
+ p = z_get_HTTP_Response(o, 200);
+ hres = p->u.HTTP_Response;
+ ret = z_soap_codec_enc(assoc->encode, &soap_package,
+ &hres->content_buf, &hres->content_len,
+ soap_handlers, charset);
+ hres->code = http_code;
+ if (!charset)
+ z_HTTP_header_add(o, &hres->headers, "Content-Type", "text/xml");
+ else
+ {
+ char ctype[60];
+ strcpy(ctype, "text/xml; charset=");
+ strcat(ctype, charset);
+ z_HTTP_header_add(o, &hres->headers, "Content-Type", ctype);
+ }
+ }
+ else
+ p = z_get_HTTP_Response(o, http_code);