summaryrefslogtreecommitdiff
path: root/sapi/nsapi/nsapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/nsapi/nsapi.c')
-rw-r--r--sapi/nsapi/nsapi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index 4e664b6559..94ac4072f7 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -478,6 +478,13 @@ nsapi_request_ctor(NSLS_D SLS_DC)
SG(request_info).path_translated = nsapi_strdup(path_translated);
SG(request_info).content_type = nsapi_strdup(content_type);
SG(request_info).content_length = (content_length == NULL) ? 0 : strtoul(content_length, 0, 0);
+ SG(sapi_headers).http_response_code = 200;
+ if (!strcmp(request_method, "HEAD")) {
+ SG(request_info).headers_only = 1;
+ } else {
+ SG(request_info).headers_only = 0;
+ }
+
}
static void