Mercurial > urweb
comparison src/c/request.c @ 1037:83d8ddd09d95
Send RPCs with POST, to avoid caching
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 21 Nov 2009 14:29:35 -0500 |
parents | 6304f5e8fbb4 |
children | 217eb87dde31 |
comparison
equal
deleted
inserted
replaced
1036:e214ac93d73e | 1037:83d8ddd09d95 |
---|---|
170 char *inputs; | 170 char *inputs; |
171 | 171 |
172 if (!strcmp(method, "POST")) { | 172 if (!strcmp(method, "POST")) { |
173 char *clen_s = uw_Basis_requestHeader(ctx, "Content-length"); | 173 char *clen_s = uw_Basis_requestHeader(ctx, "Content-length"); |
174 if (!clen_s) { | 174 if (!clen_s) { |
175 log_error(logger_data, "No Content-length with POST\n"); | 175 clen_s = "0"; |
176 return FAILED; | 176 /*log_error(logger_data, "No Content-length with POST\n"); |
177 return FAILED;*/ | |
177 } | 178 } |
178 int clen = atoi(clen_s); | 179 int clen = atoi(clen_s); |
179 if (clen < 0) { | 180 if (clen < 0) { |
180 log_error(logger_data, "Negative Content-length with POST\n"); | 181 log_error(logger_data, "Negative Content-length with POST\n"); |
181 return FAILED; | 182 return FAILED; |