unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
Cc: Masatake YAMATO <jet@gyve.org>, Thien-Thi Nguyen <ttn@glug.org>,
	emacs-devel@gnu.org
Subject: Re: help with URL module needed
Date: Mon, 29 Nov 2004 00:37:39 +0200	[thread overview]
Message-ID: <200411290037.39196.pogonyshev@gmx.net> (raw)
In-Reply-To: <jept1xzt1i.fsf@sykes.suse.de>

Andreas Schwab wrote:
> Paul Pogonyshev <pogonyshev@gmx.net> 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	other threads:[~2004-11-28 22:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-26 15:32 help with URL module needed Paul Pogonyshev
2004-11-26 16:04 ` Masatake YAMATO
2004-11-26 16:58   ` Paul Pogonyshev
2004-11-28 14:38     ` Paul Pogonyshev
2004-11-28 19:12       ` Andreas Schwab
2004-11-28 22:37         ` Paul Pogonyshev [this message]
2004-11-28 22:59           ` Andreas Schwab
2004-11-28 23:12             ` Paul Pogonyshev
2004-11-28 23:43               ` Alex Schroeder
2004-11-29  0:10               ` Andreas Schwab
2004-11-29 14:01                 ` Paul Pogonyshev
2004-11-30 19:49                   ` Paul Pogonyshev
2004-11-30 21:29                     ` Andreas Schwab
2004-11-29 21:42             ` Thien-Thi Nguyen
2004-11-30  0:35               ` Andreas Schwab
2004-11-30  9:22                 ` Thien-Thi Nguyen
2004-11-30 17:18         ` Mark A. Hershberger
2004-11-26 16:27 ` Thien-Thi Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411290037.39196.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=jet@gyve.org \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).