summaryrefslogtreecommitdiff
path: root/src/gmrequest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r--src/gmrequest.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c
index 2471f311..cd193627 100644
--- a/src/gmrequest.c
+++ b/src/gmrequest.c
@@ -629,7 +629,7 @@ void submit_GmRequest(iGmRequest *d) {
629 iGmResponse *resp = d->resp; 629 iGmResponse *resp = d->resp;
630 clear_GmResponse(resp); 630 clear_GmResponse(resp);
631#if !defined (NDEBUG) 631#if !defined (NDEBUG)
632 printf("[GmRequest] URL: %s\n", cstr_String(&d->url)); 632 printf("[GmRequest] URL: %s\n", cstr_String(&d->url)); fflush(stdout);
633#endif 633#endif
634 iUrl url; 634 iUrl url;
635 init_Url(&url, &d->url); 635 init_Url(&url, &d->url);
@@ -901,10 +901,11 @@ void submit_GmRequest(iGmRequest *d) {
901 /* Titan requests can have an arbitrary payload. */ 901 /* Titan requests can have an arbitrary payload. */
902 if (isTitan_GmRequest_(d)) { 902 if (isTitan_GmRequest_(d)) {
903 iBlock content; 903 iBlock content;
904 initCopy_Block(&content, utf8_String(&d->url)); 904 init_Block(&content, 0);
905 if (d->titan) { 905 if (d->titan) {
906 printf_Block(&content, 906 printf_Block(&content,
907 ";mime=%s;size=%zu", 907 "%s;mime=%s;size=%zu",
908 cstr_String(&d->url),
908 cstr_String(&d->titan->mime), 909 cstr_String(&d->titan->mime),
909 size_Block(&d->titan->data)); 910 size_Block(&d->titan->data));
910 if (!isEmpty_String(&d->titan->token)) { 911 if (!isEmpty_String(&d->titan->token)) {
@@ -917,7 +918,8 @@ void submit_GmRequest(iGmRequest *d) {
917 } 918 }
918 else { 919 else {
919 /* Empty data. */ 920 /* Empty data. */
920 appendCStr_Block(&content, ";mime=application/octet-stream;size=0\r\n"); 921 printf_Block(
922 &content, "%s;mime=application/octet-stream;size=0\r\n", cstr_String(&d->url));
921 } 923 }
922 setContent_TlsRequest(d->req, &content); 924 setContent_TlsRequest(d->req, &content);
923 deinit_Block(&content); 925 deinit_Block(&content);