PROTOCOL_ERROR on Google calendar .ics file download
This is with git master at commit 6f611a51.
Run from your build directory:
./examples/get -d http://calendar.google.com/calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co%40group.calendar.google.com/public/basic.ics
and you get Failed to send request: PROTOCOL_ERROR
error.
Changing http
to https
fixes it, but libsoup2 is able to download the file, thus the libsoup3 should be as well. Or it should get a better error, because this one is meaningless for any audience (the server returns "400 Bad Request").
Here is the log
./_build/examples/get -d http://calendar.google.com/calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co%40group.calendar.google.com/public/basic.ics
> GET /calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co%40group.calendar.google.com/public/basic.ics HTTP/1.1
> Soup-Debug-Timestamp: 1653400398
> Soup-Debug: SoupSession 1 (0x1a3e0d0), SoupMessage 1 (0x1a4b190), GSocket 1 (0x7fa00800d7c0)
> Accept-Encoding: gzip, deflate
> User-Agent: get libsoup/3.1.0
> Accept-Language: en-us, en;q=0.9
> Connection: Keep-Alive
> Host: calendar.google.com
< HTTP/1.1 301 Moved Permanently
< Soup-Debug-Timestamp: 1653400398
< Soup-Debug: SoupMessage 1 (0x1a4b190)
< Content-Type: application/binary
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: Mon, 01 Jan 1990 00:00:00 GMT
< Date: Tue, 24 May 2022 13:53:18 GMT
< Location: https://calendar.google.com/calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co@group.calendar.google.com/public/basic.ics
< Server: ESF
< Content-Length: 0
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
> GET /calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co@group.calendar.google.com/public/basic.ics HTTP/2
> Soup-Debug-Timestamp: 1653400398
> Soup-Debug: SoupSession 1 (0x1a3e0d0), SoupMessage 1 (0x1a4b190), GSocket 2 (0x7fa00800da60), restarted
> Accept-Encoding: gzip, deflate
> Accept-Language: en-us, en;q=0.9
> Connection: Keep-Alive
> Host: calendar.google.com
> User-Agent: get libsoup/3.1.0
Failed to send request: PROTOCOL_ERROR
- Note of the change from HTTP/1.1 to HTTP/2 in the last (redirected) request.
- Note the redirect is to
https
- Note the log for direct use of the
https
doesn't show the Host URL:
Log when using https://.... (no redirect involved)
> GET /calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co%40group.calendar.google.com/public/basic.ics HTTP/2
> Soup-Debug-Timestamp: 1653400620
> Soup-Debug: SoupSession 1 (0x15b40d0), SoupMessage 1 (0x15c1190), GSocket 1 (0x7fa3f800d7c0)
> Accept-Encoding: gzip, deflate, br
> User-Agent: get libsoup/3.1.0
> Accept-Language: en-us, en;q=0.9
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
.....