Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (2)
    As of 2020-10-20 23:31 GMT
    Find Nodes?
      Voting Booth?
      My favourite web site is:

      Results (212 votes). Check out past polls.