Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Problems posting form info to a .asp site using LWP

by Zombie sublow (Initiate)
on Jul 03, 2001 at 20:47 UTC ( #93577=categorized question: print w/replies, xml ) Need Help??
Contributed by Zombie sublow on Jul 03, 2001 at 20:47 UTC
Q&A  > HTTP and FTP clients


I have attempted to automate posting info to a form on a remote website but keep getting a response (mostly in german) saying "your system can probably not handle *.asp files". A similar program using LWP with the GET method works fine for a separate website but I seem to remember reading somewhere that LWP doesnt work with .asp sites. Is this true? If so, is there a way around the problem as I have hundreds of proteins to scan and cutting and pasting this info into my browser takes far too long! Any ideas would be gratefully received.

Answer: Problems posting form info to a .asp site using LWP
contributed by arhuman

Check :

  • If you get a 30x HTTP Response from the server, for LWP doesn't handle POST as the IIS server expect when there's a redirection (look at Redirect_ok)...
  • Fake the UserAgent to an usual one 'Mozilla..'
  • Fake a referer (setting it to the page where the form is...)

In last resort use SocketWorkbench to find what's different with a posting via your browser...
Answer: Problems posting form info to a .asp site using LWP
contributed by tomhukins

If you are having problems, it should not be due the technology deployed on the server side.

LWP is a set of Web client libraries that make requests using HTTP and other protocols. ASP is a server-side technology that is used to send responses to HTTP requests. So, as long as LWP and ASP deal with HTTP well (which in my experience they do - I dislike ASP, but there are other reasons for that), the specific languages and technologies deployed should not cause a problem.

Please (register and) log in if you wish to add an answer

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Corion]: Do you want to launch a script and keep the command prompt/console window open?
    [Corion]: Do you want to wait for a key press before closing the window?
    [LanX]: I want the command line in the history
    [tye]: -Mouse
    [Corion]: Option a) would mean launching cmd.exe /k c:\path\to\ batchfile- launching-perl- script.cmd. Option b) would be to add pause as the last line of said batch file.
    [LanX]: First day after holidays ... and already stressed by the fact that colleagues changed stuff without communication ... apparently I'm the only one trying to fight entropy
    [Corion]: LanX: The command is always in the history if you typed it in before. If you didn't type the command into the command line, it will not be there. I think there is doskey which can stuff command lines into the history
    LanX damns the cult of CB ;-)
    [LanX]: please forget my last 3 posts

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (13)
    As of 2017-03-27 15:46 GMT
    Find Nodes?
      Voting Booth?
      Should Pluto Get Its Planethood Back?

      Results (320 votes). Check out past polls.