Base changes to HTTP.c on correct file version
This commit is contained in:
parent
aeb383742f
commit
0c8fae82c7
11
src/http.c
11
src/http.c
@ -6,7 +6,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@ -15,8 +15,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
@ -468,7 +467,7 @@ int http_async_req_status(void *ctx)
|
||||
if (cx->txdl)
|
||||
{
|
||||
// generate POST
|
||||
cx->tbuf = malloc(strlen(cx->host) + strlen(cx->path) + 127 + cx->txdl + cx->thlen);
|
||||
cx->tbuf = malloc(strlen(cx->host) + strlen(cx->path) + 126 + cx->txdl + cx->thlen);
|
||||
cx->tptr = 0;
|
||||
cx->tlen = 0;
|
||||
cx->tlen += sprintf(cx->tbuf+cx->tlen, "POST %s HTTP/1.1\r\n", cx->path);
|
||||
@ -499,7 +498,7 @@ int http_async_req_status(void *ctx)
|
||||
else
|
||||
{
|
||||
// generate GET
|
||||
cx->tbuf = malloc(strlen(cx->host) + strlen(cx->path) + 95 + cx->thlen);
|
||||
cx->tbuf = malloc(strlen(cx->host) + strlen(cx->path) +93 + cx->thlen);
|
||||
cx->tptr = 0;
|
||||
cx->tlen = 0;
|
||||
cx->tlen += sprintf(cx->tbuf+cx->tlen, "GET %s HTTP/1.1\r\n", cx->path);
|
||||
@ -914,7 +913,7 @@ char *http_multipart_post(char *uri, char **names, char **parts, int *plens, cha
|
||||
plens[i] = strlen(parts[i]);
|
||||
}
|
||||
|
||||
retry:
|
||||
retry:
|
||||
if (blen >= 31)
|
||||
goto fail;
|
||||
memset(map, 0, 62*sizeof(int));
|
||||
|
Loading…
Reference in New Issue
Block a user