• R/O
  • SSH
  • HTTPS

svardos: Commit


Commit MetaInfo

Revision330 (tree)
Time2021-05-14 04:47:59
Authormateuszviste

Log Message

pkgnet sends http/1.0 requests to avoid getting chunked transfers

Change Summary

Incremental Difference

--- pkgnet/pkgnet.c (revision 329)
+++ pkgnet/pkgnet.c (revision 330)
@@ -34,7 +34,7 @@
3434
3535 #include "net.h"
3636
37-#define PVER "20210512"
37+#define PVER "20210513"
3838 #define PDATE "2021"
3939
4040 #define HOSTADDR "svardos.osdn.io"
@@ -137,8 +137,8 @@
137137 _asm int 28h; /* DOS idle */
138138 }
139139
140- /* socket is connected - send the http request */
141- snprintf((char *)buffer, sizeof(buffer), "GET %s HTTP/1.1\r\nHOST: " HOSTADDR "\r\nUSER-AGENT: pkgnet\r\nConnection: close\r\n\r\n", url);
140+ /* socket is connected - send the http request (MUST be HTTP/1.0 because I do not support chunked transfers!) */
141+ snprintf((char *)buffer, sizeof(buffer), "GET %s HTTP/1.0\r\nHOST: " HOSTADDR "\r\nUSER-AGENT: pkgnet\r\nConnection: close\r\n\r\n", url);
142142
143143 if (net_send(sock, buffer, strlen((char *)buffer)) != (int)strlen((char *)buffer)) {
144144 puts("ERROR: failed to send HTTP query to remote server");
Show on old repository browser