Content disposition Attachment



  • Not sure if this is the reason why but having trouble with the following ical url. The headers returned are "Content-Disposition: attachment;filename=ical.ics" any ideas?

    webcal://www.apposchooldistrict.com/apps/events2/ical.jsp?id=0

    Running v1.3 off of F-Droid
    Thanks!



  • Bump.. Just checking in. Can anyone assist with this URL? Thanks!


  • developer

    Hello,

    Which kind of trouble do you have?



  • couldn't parse icalendar resource.

    I'm currently using the url in Thunderbird's calendar.


  • developer

    This server doesn't return an ics file, but redirects to a HTML page when the User-Agent is ICSdroid:

    $ curl -v --user-agent 'ICSdroid/1.3 (Android 5.1)' 'http://www.apposchooldistrict.com/apps/events2/ical.jsp?id=0'
    *   Trying 64.147.114.100...
    * TCP_NODELAY set
    * Connected to www.apposchooldistrict.com (64.147.114.100) port 80 (#0)
    > GET /apps/events2/ical.jsp?id=0 HTTP/1.1
    > Host: www.apposchooldistrict.com
    > User-Agent: ICSdroid/1.3 (Android 5.1)
    > Accept: */*
    > 
    < HTTP/1.1 302 Moved Temporarily
    < Date: Wed, 27 Sep 2017 14:02:01 GMT
    < Server: Apache
    < Set-Cookie: ENUnique=0.7317429181039034; Expires=Thu, 27-Sep-2018 14:02:01 GMT; Path=/
    < Location: http://www.apposchooldistrict.com/m/events2/ical.jsp?id=0
    < Vary: Accept-Encoding,User-Agent
    < Transfer-Encoding: chunked
    < Content-Type: text/plain; charset=UTF-8
    < 
    * Connection #0 to host www.apposchooldistrict.com left intact
    
    $ curl -v --user-agent 'ICSdroid/1.3 (Android 5.1)' 'http://www.apposchooldistrict.com/m/events2/ical.jsp?id=0'
    *   Trying 64.147.114.100...
    * TCP_NODELAY set
    * Connected to www.apposchooldistrict.com (64.147.114.100) port 80 (#0)
    > GET /m/events2/ical.jsp?id=0 HTTP/1.1
    > Host: www.apposchooldistrict.com
    > User-Agent: ICSdroid/1.3 (Android 5.1)
    > Accept: */*
    > 
    < HTTP/1.1 200 OK
    < Date: Wed, 27 Sep 2017 14:00:20 GMT
    < Server: Apache
    < Set-Cookie: ENUnique=0.8075417719490819; Expires=Thu, 27-Sep-2018 14:00:20 GMT; Path=/
    < Set-Cookie: JSESSIONID=7805B32DCA1DCFE5EB86247578591363.w0a; Path=/m
    < Vary: Accept-Encoding,User-Agent
    < Transfer-Encoding: chunked
    < Content-Type: text/html;charset=utf-8
    < 
    
    
    
    
    	
    
    
    
    
    <!DOCTYPE HTML>
    <!-- w0a -->
    
    
    	<html lang="en">
    	<head>
    		<title>Appoquinimink School District</title>
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    		<meta http-equiv="description" content="Appoquinimink School District">
    […]
    

    With default curl header:

    $ curl -v 'http://www.apposchooldistrict.com/apps/events2/ical.jsp?id=0'
    *   Trying 64.147.114.100...
    * TCP_NODELAY set
    * Connected to www.apposchooldistrict.com (64.147.114.100) port 80 (#0)
    > GET /apps/events2/ical.jsp?id=0 HTTP/1.1
    > Host: www.apposchooldistrict.com
    > User-Agent: curl/7.53.1
    > Accept: */*
    > 
    < HTTP/1.1 200 OK
    < Date: Wed, 27 Sep 2017 14:03:05 GMT
    < Server: Apache
    < Set-Cookie: ENUnique=0.07192369182210079; Expires=Thu, 27-Sep-2018 14:03:05 GMT; Path=/
    < Set-Cookie: JSESSIONID=C5F19AE36D3FC8C6AFB1C236BA200C67.w0a; Path=/apps
    < Content-Disposition: attachment;filename=ical.ics
    < Vary: Accept-Encoding,User-Agent
    < Transfer-Encoding: chunked
    < Content-Type: text/calendar;charset=UTF-8
    < 
    BEGIN:VCALENDAR
    METHOD:PUBLISH
    PRODID:-//Educational Networks Inc//Educational Networks Calendar//EN
    VERSION:2.0
    CALSCALE:GREGORIAN
    X-WR-CALNAME: District Events
    X-WR-TIMEZONE:US/Eastern
    BEGIN:VTIMEZONE
    […]
    

    This has to be fixed on the server side.



  • @rfc2822 Trying to get a school district to make a change will be troublesome. Is there a way we can override a new useragent?



  • @dirwiz you could always recompile ICSdroid, it's open source :)

    but in your specific case, looking at HTML page returned when trying URL on mobile device, it seems you can work around their bug by adding "skipMobile=1" flag, like this:

    http://www.apposchooldistrict.com/apps/events2/ical.jsp?skipMobile=1&id=0
    


  • I shall give it a try! Keep up the great work. Absolutely love this app!


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.