Index: nanohttp.c @@ -523,37 +523,27 @@ } if ((*cur != 0) && (*cur != ' ') && (*cur != '\t')) return; ctxt->returnValue = ret; - } else if (!strncmp(line, "Content-Type:", 13)) { + } else if (!strncmp(line, "Content-Type:", 13) + || !strncmp(line, "Content-type:", 13) + || !strncmp(line, "content-type:", 13)) { cur += 13; while ((*cur == ' ') || (*cur == '\t')) cur++; if (ctxt->contentType != NULL) xmlFree(ctxt->contentType); ctxt->contentType = xmlMemStrdup(cur); - } else if (!strncmp(line, "ContentType:", 12)) { + } else if (!strncmp(line, "ContentType:", 12) + || !strncmp(line, "Contenttype:", 12) + || !strncmp(line, "contenttype:", 12)) { cur += 12; if (ctxt->contentType != NULL) return; while ((*cur == ' ') || (*cur == '\t')) cur++; ctxt->contentType = xmlMemStrdup(cur); - } else if (!strncmp(line, "content-type:", 13)) { - cur += 13; - if (ctxt->contentType != NULL) return; - while ((*cur == ' ') || (*cur == '\t')) cur++; - ctxt->contentType = xmlMemStrdup(cur); - } else if (!strncmp(line, "contenttype:", 12)) { - cur += 12; - if (ctxt->contentType != NULL) return; - while ((*cur == ' ') || (*cur == '\t')) cur++; - ctxt->contentType = xmlMemStrdup(cur); - } else if (!strncmp(line, "Location:", 9)) { + } else if (!strncmp(line, "Location:", 9) + || !strncmp(line, "location:", 9)) { cur += 9; while ((*cur == ' ') || (*cur == '\t')) cur++; if (ctxt->location != NULL) xmlFree(ctxt->location); - ctxt->location = xmlMemStrdup(cur); - } else if (!strncmp(line, "location:", 9)) { - cur += 9; - if (ctxt->location != NULL) return; - while ((*cur == ' ') || (*cur == '\t')) cur++; ctxt->location = xmlMemStrdup(cur); } }