unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [BUG] in url-construction in `w3m-form-submit'
@ 2013-07-31 14:12 Thorsten Jolitz
  2013-07-31 15:35 ` Thorsten Jolitz
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Jolitz @ 2013-07-31 14:12 UTC (permalink / raw)
  To: help-gnu-emacs


Hi List,

[emacs-w3m isn't part of emacs, so I don't file a bug-report - right?]

* Steps to reproduce:

1. Create an account for the PicoLisp Wiki
   goto
   http://picolisp.com/5000/-2.html?*ID=$login
   enter name and password and click OK

2. Login with standalone w3m

   Goto

#+begin_src sh
   $ w3m http://wiki.picolisp.com
#+end_src

   and login via w3m - it works

3. Repeat (2.) with emacs-w3m -> error:

#+begin_quote Location:
   http://picolisp.com/56352250583933977~!start?*Menu=+3&*Tab=+1&*ID= Cannot
   retrieve URL: http://picolisp.com/56352250583933977~!start?*Menu=+3&*Tab=
   +1&*ID= (exit status: 0)
   -------------------------------------------------------------------------
   -------------------------------------------------------------------------
   Header information W3m-current-url:
   http://picolisp.com/56352250583933977~!start?*Menu=+3&*Tab=+1&*ID=
   W3m-document-charset: US-ASCII
#+end_quote


* Problem
url is incomplete:

,--------------------------------------
| http://picolisp.com/56352250583933977...
`--------------------------------------

here is the beginning of the html source of the login page:

#+begin_src html
  <!DOCTYPE html>
  <html lang="en">
  <head>
  <title>PicoLisp Wiki</title>
  <base href="http://picolisp.com/52313/"/>
  [...snip...]
  <li class="act1"><a href="56352250583933977~!start?*Menu=+3&*Tab=+1&*ID="
  title="--&gt;">Home</a></li>
#+end_src

url should be

,------------------------------------------------
| http://picolisp.com/52313/56352250583933977 ...
`------------------------------------------------

and looks like that in stand-alone w3m.

* Bug

in `w3m-form-submit' in w3m-form.el the url-handling ignores the base href:

#+begin_src emacs-lisp
  (defun w3m-form-submit (form &optional id name value new-session download)
    [...snip...]
      (let* ((orig-url w3m-current-url)
             (url (or (w3m-form-action form)
                      (if (string-match "\\?" w3m-current-url)
                          (substring w3m-current-url 0 (match-beginning 0))
                        w3m-current-url)))) [...]
#+end_src

This line

,--------------------------------
| (url (or (w3m-form-action form)
`--------------------------------

should be changed to something that treats the href in the form as relative,
when <base href=...> is given, and concatenates it with its base.

--
cheers,
Thorsten




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] in url-construction in `w3m-form-submit'
  2013-07-31 14:12 [BUG] in url-construction in `w3m-form-submit' Thorsten Jolitz
@ 2013-07-31 15:35 ` Thorsten Jolitz
  0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Jolitz @ 2013-07-31 15:35 UTC (permalink / raw)
  To: help-gnu-emacs

Thorsten Jolitz <tjolitz@gmail.com> writes:

> Hi List,
>
> [emacs-w3m isn't part of emacs, so I don't file a bug-report - right?]

I just found out that emacs-w3m has it's own mailing (with lots of
chinese/japanese conversation though), so I rather repost my bug-report
there.

Sorry for the noise.

-- 
cheers,
Thorsten




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-31 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 14:12 [BUG] in url-construction in `w3m-form-submit' Thorsten Jolitz
2013-07-31 15:35 ` Thorsten Jolitz

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).