Changeset 3333
- Timestamp:
- Oct 4, 2010 1:11:54 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/http_client.c
r3332 r3333 1305 1305 8 + /* nc=.. */ 1306 1306 30 + /* cnonce= */ 1307 12 + chal->opaque.slen + /* opaque=".." */ 1307 1308 0; 1308 1309 phdr->value.ptr = (char*)pj_pool_alloc(hreq->pool, len); … … 1376 1377 phdr->value.slen = len; 1377 1378 1379 if (chal->opaque.slen) { 1380 pj_strcat2(&phdr->value, ", opaque=\""); 1381 pj_strcat(&phdr->value, &chal->opaque); 1382 pj_strcat2(&phdr->value, "\""); 1383 } 1384 1378 1385 } else { 1379 1386 /* Server requires quality protection that we don't support. */ … … 1475 1482 pkt.slen = 0; 1476 1483 /* Start-line */ 1477 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "%.*s %.*s %s/%.*s\ n",1484 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "%.*s %.*s %s/%.*s\r\n", 1478 1485 STR_PREC(hreq->param.method), 1479 1486 STR_PREC(hreq->hurl.path), … … 1481 1488 STR_PREC(hreq->param.version)); 1482 1489 /* Header field "Host" */ 1483 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "Host: %.*s:%d\ n",1490 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "Host: %.*s:%d\r\n", 1484 1491 STR_PREC(hreq->hurl.host), hreq->hurl.port); 1485 1492 if (!pj_strcmp2(&hreq->param.method, http_method_names[HTTP_PUT])) { … … 1490 1497 hreq->param.reqdata.total_size: 1491 1498 hreq->param.reqdata.size, buf); 1492 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "%s: %s\ n",1499 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "%s: %s\r\n", 1493 1500 CONTENT_LENGTH, buf); 1494 1501 } … … 1496 1503 /* Append user-specified headers */ 1497 1504 for (i = 0; i < hreq->param.headers.count; i++) { 1498 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "%.*s: %.*s\ n",1505 str_snprintf(&pkt, BUF_SIZE, PJ_TRUE, "%.*s: %.*s\r\n", 1499 1506 STR_PREC(hreq->param.headers.header[i].name), 1500 1507 STR_PREC(hreq->param.headers.header[i].value)); … … 1505 1512 } 1506 1513 1507 pj_strcat2(&pkt, "\ n");1514 pj_strcat2(&pkt, "\r\n"); 1508 1515 pkt.ptr[pkt.slen] = 0; 1509 1516 TRACE_((THIS_FILE, "%s", pkt.ptr));
Note: See TracChangeset
for help on using the changeset viewer.