Tags:
create new tag
, view all tags

Question

(See HowToScriptPageModification for my previous question that led to this question.)

When I run:

    curl --location http://sw-wiki/twiki/bin/save/Main/DarylsTest?username=DarylSpitzer;password=xxxxx;text=foo

...curl outputs HTML of our template login page with "Unrecognized user and/or password". (sw-wiki is the "intranet" domain of our TWiki server.)

But if I paste:

    http://sw-wiki/twiki/bin/save/Main/DarylsTest?username=DarylSpitzer;password=xxxxx;text=foo

into Firefox (even if I make sure that there is not already an open session), it works.

(Of course I use my "real" password above in place of "xxxxx".)

Does anyone know why it's not working with curl?

Environment

TWiki version: TWikiRelease04x01x01
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Authentication

-- DarylSpitzer - 23 Apr 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

This may be a clue...this snippet of Python code:

    URL = 'http://sw-wiki/twiki/bin/save/Main/DarylsTest?username=DarylSpitzer;password=xxxxx;text=foo'
    page = urllib.urlopen( URL )
    print page.info()

...returns:

    Date: Tue, 24 Apr 2007 16:18:13 GMT
    Server: Apache/2.0.52 (Red Hat)
    Set-Cookie: TWIKISID=17ff2a2ff4e95efd1aa05e8d19ddda57; path=/
    Location: /twiki/bin/save/Main/DarylsTest?text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;text=foo;username=DarylSpitzer;password=xxxxx;text=foo
    Content-Length: 0
    Connection: close
    Content-Type: text/plain; charset=ISO-8859-1

Why is "text=foo;" replicated so many times (and inserted before the username)?

-- DarylSpitzer - 24 Apr 2007

Sorry, closing this after more than 30 days inactivity...

-- PeterThoeny - 02 Jun 2007

 
Change status to:
Topic revision: r3 - 2007-06-02 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.