mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-05 07:20:58 +00:00
Use httplib cookie parsing; fix docs.
This commit is contained in:
parent
c9f59452ac
commit
4c71b5ba68
6 changed files with 14 additions and 14 deletions
|
|
@ -1,7 +1,7 @@
|
|||
7.0 "" (released xx.xx.2011)
|
||||
|
||||
Fixes:
|
||||
- doc: Correct reference to RFC 2822 for cookie file format.
|
||||
- doc: Correct reference to RFC 2616 for cookie file format.
|
||||
Closes: SF bug #3299557
|
||||
|
||||
Changes:
|
||||
|
|
|
|||
10
doc/de.po
10
doc/de.po
|
|
@ -5,8 +5,8 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: linkchecker 3.4\n"
|
||||
"POT-Creation-Date: 2011-05-14 09:42+0300\n"
|
||||
"PO-Revision-Date: 2011-05-14 09:43+0100\n"
|
||||
"POT-Creation-Date: 2011-05-14 13:52+0300\n"
|
||||
"PO-Revision-Date: 2011-05-14 13:53+0100\n"
|
||||
"Last-Translator: Bastian Kleineidam <calvin@users.sourceforge.net>\n"
|
||||
"Language-Team: de <de@li.org>\n"
|
||||
"Language: \n"
|
||||
|
|
@ -1058,11 +1058,11 @@ msgstr "COOKIE-DATEIEN"
|
|||
#. type: Plain text
|
||||
#: en/linkchecker.1:284
|
||||
msgid ""
|
||||
"A cookie file contains standard email header (RFC 2822) data with the "
|
||||
"A cookie file contains standard HTTP header (RFC 2616) data with the "
|
||||
"following possible names:"
|
||||
msgstr ""
|
||||
"Eine Cookie-Datei enthält Standard Email-Kopfdaten (RFC 2822) mit den "
|
||||
"folgenden möglichen Namen:"
|
||||
"Eine Cookie-Datei enthält Standard HTTP-Header (RFC 2616) mit den folgenden "
|
||||
"möglichen Namen:"
|
||||
|
||||
# type: TP
|
||||
#. type: TP
|
||||
|
|
|
|||
|
|
@ -283,8 +283,8 @@ Eine Ergänzung ist, dass ein regulärer Ausdruck negiert wird falls er mit
|
|||
einem Ausrufezeichen beginnt.
|
||||
.
|
||||
.SH COOKIE\-DATEIEN
|
||||
Eine Cookie\-Datei enthält Standard Email\-Kopfdaten (RFC 2822) mit den
|
||||
folgenden möglichen Namen:
|
||||
Eine Cookie\-Datei enthält Standard HTTP\-Header (RFC 2616) mit den folgenden
|
||||
möglichen Namen:
|
||||
.
|
||||
.TP
|
||||
\fBScheme\fP (optional)
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ An addition is that a leading exclamation mark negates the regular
|
|||
expression.
|
||||
.
|
||||
.SH COOKIE FILES
|
||||
A cookie file contains standard email header (RFC 2822) data with the
|
||||
A cookie file contains standard HTTP header (RFC 2616) data with the
|
||||
following possible names:
|
||||
.
|
||||
.TP
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2011-05-14 09:42+0300\n"
|
||||
"POT-Creation-Date: 2011-05-14 13:52+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
@ -811,7 +811,7 @@ msgstr ""
|
|||
#. type: Plain text
|
||||
#: en/linkchecker.1:284
|
||||
msgid ""
|
||||
"A cookie file contains standard email header (RFC 2822) data with the "
|
||||
"A cookie file contains standard HTTP header (RFC 2616) data with the "
|
||||
"following possible names:"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ import time
|
|||
import re
|
||||
import Cookie
|
||||
import cookielib
|
||||
import httplib
|
||||
from cStringIO import StringIO
|
||||
import rfc822
|
||||
from . import strformat
|
||||
|
||||
|
||||
|
|
@ -372,13 +372,13 @@ def from_file (filename):
|
|||
|
||||
|
||||
def from_headers (strheader):
|
||||
"""Parse cookie data from a string in HTTP header (RFC 822) format.
|
||||
"""Parse cookie data from a string in HTTP header (RFC 2616) format.
|
||||
|
||||
@return: tuple (headers, scheme, host, path)
|
||||
@raises: ValueError for incomplete or invalid data
|
||||
"""
|
||||
fp = StringIO(strheader)
|
||||
headers = rfc822.Message(fp, seekable=True)
|
||||
headers = httplib.HTTPMessage(fp, seekable=True)
|
||||
if "Host" not in headers:
|
||||
raise ValueError("Required header 'Host:' missing")
|
||||
host = headers["Host"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue