nystudio107 / craft-icalendar

Tools for parsing & formatting the RFC 2445 iCalendar (.ics) specification
MIT License
8 stars 2 forks source link

Outlook ICS "Failed to open stream: HTTP request failed! HTTP/1.1 400" #33

Closed SamLNL closed 2 years ago

SamLNL commented 2 years ago

Description

I get "Failed to open stream: HTTP request failed! HTTP/1.1 400" whenever I try to use the parseIcs function with my Outlook ics link. The Outlook ics link is public accessible. I've seen #32 , but I'm using the newest version and still have the problem. I also tried adding httpUserAgent in the config like stating here, but without succes.

{% set cal = parseIcs(icsLink, {
        "httpUserAgent" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    }) %}

Versions

khalwat commented 2 years ago

See this issue: https://github.com/nystudio107/craft-icalendar/issues/32

They need to fix it in the core library that iCalendar uses

SamLNL commented 2 years ago

Thanks for replying.

I've read issue #32 , but I can't seem to find a active issue regarding this issue. Is there a active issue regarding 'They need to fix it in the core library that iCalendar uses'?

khalwat commented 2 years ago

Right here: https://github.com/u01jmg3/ics-parser/issues/311

I think it's been merged, but no release has been tagged yet.

SamLNL commented 2 years ago

Thanks!

SamLNL commented 2 years ago

@khalwat FYI

https://github.com/u01jmg3/ics-parser/issues/311 3.2.0 is out now. This means you can now set a custom "httpUserAgent". Got it working using this code;

parseIcs(calendar.icsLink, {
        "httpUserAgent" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    }