Pergunta

I am sending raw requests, and receiving raw responses through HTTP. A number of characters appear to be escaped in the response, such as the comma in this example: "LOCATION:Philadelphia\, PA." My question is, is this a HTTP thing, a PHP thing, or a CalDav thing? And what other characters are considered "special"?

EDIT:

The actual response:

HTTP/1.1 207 Multi-Status
Date: Tue, 10 Apr 2012 20:24:26 GMT
Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.14 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g mod_wsgi/2.0 Python/2.5.2 mod_perl/2.0.3 Perl/v5.8.8
X-Powered-By: PHP/5.2.4-2ubuntu5.14
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule
Content-Location: /davical/caldav.php/rwr26/home/
ETag: "dd99b87d4c1051ea2e9f4bf203e1a148"
X-DAViCal-Version: DAViCal/0.9.9; DB/1.2.9
Content-Length: 1305
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8"

<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
 <response>
  <href>/davical/caldav.php/rwr26/home/5F12F7DA-10B0-4EE3-820D-B56F0B2FC153.ics</href>
  <propstat>
   <prop>
    <getetag>"d7a384dba191b9659ccf12ac9edc449e"</getetag>
    <C:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-////NONSGML kigkonsult.se iCalcreator 2.10.23//
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:STANDARD
DTSTART:20111106T070000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20120311T080000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZNAME:EDT
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:5F12F7DA-10B0-4EE3-820D-B56F0B2FC153
DTSTAMP:20120408T041113Z
CLASS:PUBLIC
CREATED:20120408T041113Z
DESCRIPTION:Testfghfghfghfghfghfghfghfghfghfghfghfghfghfghfgh
DTSTART;TZID=America/New_York:20120410T000000
DTEND;TZID=America/New_York:20120419T010000
LAST-MODIFIED:20120408T041228Z
LOCATION:Philadelphia\, PA
SEQUENCE:1
SUMMARY:Test
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
</C:calendar-data>
   </prop>
   <status>HTTP/1.1 200 OK</status>
  </propstat>
 </response>
</multistatus>
Foi útil?

Solução

First assumption: CAL DAV. It's not PHP's Magic Quotes (slashes ', " and NUL). And HTTP is transport only, it does not change on it's own.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top