if (value && !strcasecmp(value, "close"))
conn->keepalive = FALSE;
+ if (!conn->method)
+ return FALSE;
+
/* Deliver request to caller */
if (!strcasecmp(conn->method, "GET") || !strcasecmp(conn->method, "HEAD")) {
httpd->callback(httpd, conn, conn->uri, conn->method,
/* Check we have received all data */
cl = silc_mime_get_field(conn->curheaders, "Content-Length");
- if (cl && sscanf(cl, "%lu", (unsigned long *)&cll) == 1) {
+ if (cl && sscanf(cl, "%u", &cll) == 1) {
if (data_len < cll) {
/* More data to come */
silc_mime_free(conn->curheaders);