Skip to content

Instantly share code, notes, and snippets.

@imlich

imlich/carddav Secret

Created May 1, 2014 09:58
Show Gist options
  • Save imlich/3cf58b242f99b175f9ae to your computer and use it in GitHub Desktop.
Save imlich/3cf58b242f99b175f9ae to your computer and use it in GitHub Desktop.
rcmcarddav: carddav debug on put record
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) get_record_from_carddav requesting https://cal.example.org:443/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf [RL 5]
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) SendRequest: http_class::__set_state(array(
'host_name' => 'cal.example.org',
'host_port' => 443,
'proxy_host_name' => '',
'proxy_host_port' => 80,
'socks_host_name' => '',
'socks_host_port' => 1080,
'socks_version' => '5',
'protocol' => 'https',
'request_method' => 'GET',
'user_agent' => 'RCM CardDAV plugin/1.0.0',
'accept' => '',
'authentication_mechanism' => '',
'user' => NULL,
'password' => NULL,
'realm' => NULL,
'workstation' => NULL,
'proxy_authentication_mechanism' => '',
'proxy_user' => NULL,
'proxy_password' => NULL,
'proxy_realm' => NULL,
'proxy_workstation' => NULL,
'request_uri' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'request' => 'GET /caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf HTTP/1.1',
'request_headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Connection' => 'Keep-Alive',
),
'request_user' => 'alice',
'request_password' => 'XXXXXXXX',
'request_realm' => NULL,
'request_workstation' => NULL,
'proxy_request_user' => NULL,
'proxy_request_password' => NULL,
'proxy_request_realm' => NULL,
'proxy_request_workstation' => NULL,
'request_body' => '',
'request_arguments' =>
array (
'Protocol' => 'https',
'HostName' => 'cal.example.org',
'Headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Connection' => 'Keep-Alive',
),
'AuthUser' => 'alice',
'AuthPassword' => 'XXXXXXXX',
'HostPort' => 443,
'RequestURI' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'RequestMethod' => 'GET',
),
'protocol_version' => '1.1',
'timeout' => 10,
'data_timeout' => 0,
'debug' => 0,
'log_debug' => 0,
'debug_response_body' => 1,
'html_debug' => 0,
'support_cookies' => 1,
'cookies' =>
array (
),
'error' => '',
'error_code' => 0,
'exclude_address' => '',
'follow_redirect' => 0,
'redirection_limit' => 5,
'response_status' => '',
'response_message' => '',
'file_buffer_length' => 8000,
'force_multipart_form_post' => 0,
'prefer_curl' => 1,
'keep_alive' => 1,
'sasl_authenticate' => 1,
'state' => 'RequestSent',
'use_curl' => true,
'connection' => NULL,
'content_length' => 0,
'response' => 'HTTP/1.1 401 Unauthorized
Date: Thu, 01 May 2014 09:48:08 GMT
Server: Apache
X-Powered-By: PHP/5.4.4-14+deb7u9
WWW-Authenticate: Basic realm="CalDAV Server example.org"
Vary: Accept-Encoding
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain; ; charset="utf-8"
Please log in for access to this system.',
'read_response' => 0,
'read_length' => 0,
'request_host' => 'cal.example.org:443',
'next_token' => '',
'redirection_level' => 0,
'chunked' => 0,
'remaining_chunk' => 0,
'last_chunk_read' => 0,
'months' =>
array (
'Jan' => '01',
'Feb' => '02',
'Mar' => '03',
'Apr' => '04',
'May' => '05',
'Jun' => '06',
'Jul' => '07',
'Aug' => '08',
'Sep' => '09',
'Oct' => '10',
'Nov' => '11',
'Dec' => '12',
),
'session' => '87c3f690c661786ba9128d8305890df0',
'connection_close' => 0,
'force_close' => 0,
'connected_host' => 'cal.example.org',
'connected_port' => 443,
'connected_ssl' => 1,
))
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) retrying forcefully
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) get_record_from_carddav requesting https://alice:XXXXXXXX@cal.example.org:443/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf [RL 4]
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) SendRequest: http_class::__set_state(array(
'host_name' => 'cal.example.org',
'host_port' => 443,
'proxy_host_name' => '',
'proxy_host_port' => 80,
'socks_host_name' => '',
'socks_host_port' => 1080,
'socks_version' => '5',
'protocol' => 'https',
'request_method' => 'GET',
'user_agent' => 'RCM CardDAV plugin/1.0.0',
'accept' => '',
'authentication_mechanism' => '',
'user' => NULL,
'password' => NULL,
'realm' => NULL,
'workstation' => NULL,
'proxy_authentication_mechanism' => '',
'proxy_user' => NULL,
'proxy_password' => NULL,
'proxy_realm' => NULL,
'proxy_workstation' => NULL,
'request_uri' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'request' => 'GET /caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf HTTP/1.1',
'request_headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Authorization' => 'Basic bmFsbGU6TG9uamFkZDk=',
'Connection' => 'Keep-Alive',
),
'request_user' => 'alice',
'request_password' => 'XXXXXXXX@alice:XXXXXXXX',
'request_realm' => NULL,
'request_workstation' => NULL,
'proxy_request_user' => NULL,
'proxy_request_password' => NULL,
'proxy_request_realm' => NULL,
'proxy_request_workstation' => NULL,
'request_body' => '',
'request_arguments' =>
array (
'Protocol' => 'https',
'HostName' => 'cal.example.org',
'Headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Authorization' => 'Basic bmFsbGU6TG9uamFkZDk=',
'Connection' => 'Keep-Alive',
),
'AuthUser' => 'alice',
'AuthPassword' => 'XXXXXXXX@alice:XXXXXXXX',
'HostPort' => 443,
'RequestURI' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'RequestMethod' => 'GET',
),
'protocol_version' => '1.1',
'timeout' => 10,
'data_timeout' => 0,
'debug' => 0,
'log_debug' => 0,
'debug_response_body' => 1,
'html_debug' => 0,
'support_cookies' => 1,
'cookies' =>
array (
),
'error' => '',
'error_code' => 0,
'exclude_address' => '',
'follow_redirect' => 0,
'redirection_limit' => 5,
'response_status' => '',
'response_message' => '',
'file_buffer_length' => 8000,
'force_multipart_form_post' => 0,
'prefer_curl' => 1,
'keep_alive' => 1,
'sasl_authenticate' => 1,
'state' => 'RequestSent',
'use_curl' => true,
'connection' => NULL,
'content_length' => 0,
'response' => 'HTTP/1.1 404 Not Found
Date: Thu, 01 May 2014 09:48:08 GMT
Server: Apache
X-Powered-By: PHP/5.4.4-14+deb7u9
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule, extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
X-DAViCal-Version: DAViCal/1.1.0; DB/1.2.11
Content-Length: 19
Vary: Accept-Encoding
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset="utf-8"
Resource Not Found.',
'read_response' => 0,
'read_length' => 0,
'request_host' => 'cal.example.org:443',
'next_token' => '',
'redirection_level' => 0,
'chunked' => 0,
'remaining_chunk' => 0,
'last_chunk_read' => 0,
'months' =>
array (
'Jan' => '01',
'Feb' => '02',
'Mar' => '03',
'Apr' => '04',
'May' => '05',
'Jun' => '06',
'Jul' => '07',
'Aug' => '08',
'Sep' => '09',
'Oct' => '10',
'Nov' => '11',
'Dec' => '12',
),
'session' => '3e5960f2a7b92eb2daff285e2310cbaa',
'connection_close' => 0,
'force_close' => 0,
'connected_host' => 'cal.example.org',
'connected_port' => 443,
'connected_ssl' => 1,
))
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) Code: 404
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) success: array (
'status' => '404',
'headers' =>
array (
'http/1.1 404 not found' => '',
'date' => 'Thu, 01 May 2014 09:48:08 GMT',
'server' => 'Apache',
'x-powered-by' => 'PHP/5.4.4-14+deb7u9',
'dav' => '1, 2, 3, access-control, calendar-access, calendar-schedule, extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy',
'x-davical-version' => 'DAViCal/1.1.0; DB/1.2.11',
'content-length' => '19',
'vary' => 'Accept-Encoding',
'keep-alive' => 'timeout=10, max=100',
'connection' => 'Keep-Alive',
'content-type' => 'text/plain; charset="utf-8"',
),
'body' => 'Resource Not Found.',
)
[01-May-2014 11:48:08 +0200]: BACKEND: (cdfopen) put_record_to_carddav requesting https://cal.example.org:443/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf [RL 5]
[01-May-2014 11:48:09 +0200]: BACKEND: (cdfopen) SendRequest: http_class::__set_state(array(
'host_name' => 'cal.example.org',
'host_port' => 443,
'proxy_host_name' => '',
'proxy_host_port' => 80,
'socks_host_name' => '',
'socks_host_port' => 1080,
'socks_version' => '5',
'protocol' => 'https',
'request_method' => 'PUT',
'user_agent' => 'RCM CardDAV plugin/1.0.0',
'accept' => '',
'authentication_mechanism' => '',
'user' => NULL,
'password' => NULL,
'realm' => NULL,
'workstation' => NULL,
'proxy_authentication_mechanism' => '',
'proxy_user' => NULL,
'proxy_password' => NULL,
'proxy_realm' => NULL,
'proxy_workstation' => NULL,
'request_uri' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'request' => 'PUT /caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf HTTP/1.1',
'request_headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Content-Type' => 'text/vcard; charset="utf-8"',
'If-None-Match' => '*',
'Connection' => 'Keep-Alive',
'Content-Length' => 188,
),
'request_user' => 'alice',
'request_password' => 'XXXXXXXX',
'request_realm' => NULL,
'request_workstation' => NULL,
'proxy_request_user' => NULL,
'proxy_request_password' => NULL,
'proxy_request_realm' => NULL,
'proxy_request_workstation' => NULL,
'request_body' => 'BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 3.0.0//EN
UID:2991D6FB-2F13-4C19-A380-4008CFED7ED1
REV:2014-05-01T11:48:08+02:00
N:test1;test1;;;
FN:test1 test1
END:VCARD
',
'request_arguments' =>
array (
'Protocol' => 'https',
'HostName' => 'cal.example.org',
'Headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Content-Type' => 'text/vcard; charset="utf-8"',
'If-None-Match' => '*',
'Connection' => 'Keep-Alive',
),
'AuthUser' => 'alice',
'AuthPassword' => 'XXXXXXXX',
'HostPort' => 443,
'RequestURI' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'RequestMethod' => 'PUT',
'Body' => 'BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 3.0.0//EN
UID:2991D6FB-2F13-4C19-A380-4008CFED7ED1
REV:2014-05-01T11:48:08+02:00
N:test1;test1;;;
FN:test1 test1
END:VCARD
',
),
'protocol_version' => '1.1',
'timeout' => 10,
'data_timeout' => 0,
'debug' => 0,
'log_debug' => 0,
'debug_response_body' => 1,
'html_debug' => 0,
'support_cookies' => 1,
'cookies' =>
array (
),
'error' => '',
'error_code' => 0,
'exclude_address' => '',
'follow_redirect' => 0,
'redirection_limit' => 5,
'response_status' => '',
'response_message' => '',
'file_buffer_length' => 8000,
'force_multipart_form_post' => 0,
'prefer_curl' => 1,
'keep_alive' => 1,
'sasl_authenticate' => 1,
'state' => 'RequestSent',
'use_curl' => true,
'connection' => NULL,
'content_length' => 0,
'response' => 'HTTP/1.1 401 Unauthorized
Date: Thu, 01 May 2014 09:48:09 GMT
Server: Apache
X-Powered-By: PHP/5.4.4-14+deb7u9
WWW-Authenticate: Basic realm="CalDAV Server example.org"
Vary: Accept-Encoding
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain; ; charset="utf-8"
Please log in for access to this system.',
'read_response' => 0,
'read_length' => 0,
'request_host' => 'cal.example.org:443',
'next_token' => '',
'redirection_level' => 0,
'chunked' => 0,
'remaining_chunk' => 0,
'last_chunk_read' => 0,
'months' =>
array (
'Jan' => '01',
'Feb' => '02',
'Mar' => '03',
'Apr' => '04',
'May' => '05',
'Jun' => '06',
'Jul' => '07',
'Aug' => '08',
'Sep' => '09',
'Oct' => '10',
'Nov' => '11',
'Dec' => '12',
),
'session' => '23ba98c6c5f252cd7478aacd5fcdd25a',
'connection_close' => 0,
'force_close' => 0,
'connected_host' => 'cal.example.org',
'connected_port' => 443,
'connected_ssl' => 1,
))
[01-May-2014 11:48:09 +0200]: BACKEND: (cdfopen) retrying forcefully
[01-May-2014 11:48:09 +0200]: BACKEND: (cdfopen) put_record_to_carddav requesting https://alice:XXXXXXXX@cal.example.org:443/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf [RL 4]
[01-May-2014 11:48:09 +0200]: BACKEND: (cdfopen) SendRequest: http_class::__set_state(array(
'host_name' => 'cal.example.org',
'host_port' => 443,
'proxy_host_name' => '',
'proxy_host_port' => 80,
'socks_host_name' => '',
'socks_host_port' => 1080,
'socks_version' => '5',
'protocol' => 'https',
'request_method' => 'PUT',
'user_agent' => 'RCM CardDAV plugin/1.0.0',
'accept' => '',
'authentication_mechanism' => '',
'user' => NULL,
'password' => NULL,
'realm' => NULL,
'workstation' => NULL,
'proxy_authentication_mechanism' => '',
'proxy_user' => NULL,
'proxy_password' => NULL,
'proxy_realm' => NULL,
'proxy_workstation' => NULL,
'request_uri' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'request' => 'PUT /caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf HTTP/1.1',
'request_headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Content-Type' => 'text/vcard; charset="utf-8"',
'If-None-Match' => '*',
'Authorization' => 'Basic bmFsbGU6TG9uamFkZDk=',
'Connection' => 'Keep-Alive',
'Content-Length' => 188,
),
'request_user' => 'alice',
'request_password' => 'XXXXXXXX@alice:XXXXXXXX',
'request_realm' => NULL,
'request_workstation' => NULL,
'proxy_request_user' => NULL,
'proxy_request_password' => NULL,
'proxy_request_realm' => NULL,
'proxy_request_workstation' => NULL,
'request_body' => 'BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 3.0.0//EN
UID:2991D6FB-2F13-4C19-A380-4008CFED7ED1
REV:2014-05-01T11:48:08+02:00
N:test1;test1;;;
FN:test1 test1
END:VCARD
',
'request_arguments' =>
array (
'Protocol' => 'https',
'HostName' => 'cal.example.org',
'Headers' =>
array (
'Host' => 'cal.example.org:443',
'User-Agent' => 'RCM CardDAV plugin/1.0.0',
'Content-Type' => 'text/vcard; charset="utf-8"',
'If-None-Match' => '*',
'Authorization' => 'Basic bmFsbGU6TG9uamFkZDk=',
'Connection' => 'Keep-Alive',
),
'AuthUser' => 'alice',
'AuthPassword' => 'XXXXXXXX@alice:XXXXXXXX',
'HostPort' => 443,
'RequestURI' => '/caldav.php/alice/contacts/2991D6FB-2F13-4C19-A380-4008CFED7ED1.vcf',
'RequestMethod' => 'PUT',
'Body' => 'BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 3.0.0//EN
UID:2991D6FB-2F13-4C19-A380-4008CFED7ED1
REV:2014-05-01T11:48:08+02:00
N:test1;test1;;;
FN:test1 test1
END:VCARD
',
),
'protocol_version' => '1.1',
'timeout' => 10,
'data_timeout' => 0,
'debug' => 0,
'log_debug' => 0,
'debug_response_body' => 1,
'html_debug' => 0,
'support_cookies' => 1,
'cookies' =>
array (
),
'error' => '',
'error_code' => 0,
'exclude_address' => '',
'follow_redirect' => 0,
'redirection_limit' => 5,
'response_status' => '',
'response_message' => '',
'file_buffer_length' => 8000,
'force_multipart_form_post' => 0,
'prefer_curl' => 1,
'keep_alive' => 1,
'sasl_authenticate' => 1,
'state' => 'RequestSent',
'use_curl' => true,
'connection' => NULL,
'content_length' => 0,
'response' => 'HTTP/1.1 412 Precondition Failed
Date: Thu, 01 May 2014 09:48:09 GMT
Server: Apache
X-Powered-By: PHP/5.4.4-14+deb7u9
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule, extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
X-DAViCal-Version: DAViCal/1.1.0; DB/1.2.11
Content-Length: 152
Vary: Accept-Encoding
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<error xmlns="DAV:">
<if-none-match/>Existing resource matches "If-None-Match" header - not accepted.
</error>',
'read_response' => 0,
'read_length' => 0,
'request_host' => 'cal.example.org:443',
'next_token' => '',
'redirection_level' => 0,
'chunked' => 0,
'remaining_chunk' => 0,
'last_chunk_read' => 0,
'months' =>
array (
'Jan' => '01',
'Feb' => '02',
'Mar' => '03',
'Apr' => '04',
'May' => '05',
'Jun' => '06',
'Jul' => '07',
'Aug' => '08',
'Sep' => '09',
'Oct' => '10',
'Nov' => '11',
'Dec' => '12',
),
'session' => 'd1464b6cfbe42465f530352478aec856',
'connection_close' => 0,
'force_close' => 0,
'connected_host' => 'cal.example.org',
'connected_port' => 443,
'connected_ssl' => 1,
))
[01-May-2014 11:48:09 +0200]: BACKEND: (cdfopen) Code: 412
[01-May-2014 11:48:09 +0200]: BACKEND: (cdfopen) success: array (
'status' => '412',
'headers' =>
array (
'http/1.1 412 precondition failed' => '',
'date' => 'Thu, 01 May 2014 09:48:09 GMT',
'server' => 'Apache',
'x-powered-by' => 'PHP/5.4.4-14+deb7u9',
'dav' => '1, 2, 3, access-control, calendar-access, calendar-schedule, extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy',
'x-davical-version' => 'DAViCal/1.1.0; DB/1.2.11',
'content-length' => '152',
'vary' => 'Accept-Encoding',
'keep-alive' => 'timeout=10, max=100',
'connection' => 'Keep-Alive',
'content-type' => 'text/xml; charset="utf-8"',
),
'body' => '<?xml version="1.0" encoding="utf-8" ?>
<error xmlns="DAV:">
<if-none-match/>Existing resource matches "If-None-Match" header - not accepted.
</error>',
)
@blind-coder
Copy link

You should remove the base64 encoded username and password from the Authorization headers...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment