emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with URL module needed


From: Paul Pogonyshev
Subject: Re: help with URL module needed
Date: Mon, 29 Nov 2004 00:37:39 +0200
User-agent: KMail/1.4.3

Andreas Schwab wrote:
> Paul Pogonyshev <address@hidden> writes:
> > So, I'll ease it.  Evaluate these two functions and type
> > `M-x wikipedia-login RET':
> >
> > (defun wikipedia-login ()
> >   (interactive)
> >   (let ((domain                    "en")
> >     (url-request-method        "POST")
> >     (url-request-extra-headers '(("Content-Type" .
> > "application/x-www-form-urlencoded"))) (url-request-data
> >      (wikipedia-build-post-data '(("wpName"         . "Testy Test")
> >                                   ("wpLoginattempt" . "Login")
> >                                   ("wpPassword"     . "test")
> >                                   ("wpRetype"       . "")
> >                                   ("wpEmail"        . ""))))
> >     (url-debug           t))
> >     (url-retrieve (concat "http://"; domain
> > ".wikipedia.org/w/wiki.phtml?title=Special:Userlogin&action=submit")
> > (lambda () (pop-to-buffer (current-buffer))))))
> >
> > (defun wikipedia-build-post-data (post-data-alist)
> >   (mapconcat (lambda (association)
> >            (concat (car association) "="
> >                    (url-hexify-string (cdr association))))
> >          post-data-alist "&"))
> >
> > You should get a ``411 Length Required''.
>
> The problem is that url-http-create-request does not account for the
> trailing CRLF in the Content-Length, or rather that it sends the trailing
> CRLF in the first place.

Unfortunately, this doesn't help here (I recompiled Emacs and verified that
"\r\n" is not appended after POST data anymore.)  I still get ``200 OK'' with
invalid password and ``411 Length Required'' with the valid one.

Do you mean that you cannot reproduce this?

Paul





reply via email to

[Prev in Thread] Current Thread [Next in Thread]