views:

464

answers:

1

I'm trying to access an aspx webpage using curl but it returns 500 internal server error. It doesn't require any credentials or POST variables I know of, but I think I'm missing something, because when I try to access it from my browser, it does work. The page is just a form with two fields to be filled and POSTed.

curl -L https://my.website.com

Do I need to make any changes to my curl script?

ps. I don't have access to the server or the server's logs

+2  A: 

Some things to try and ideas:

  1. trace your manual access with e.g. Fiddler or httpfox or firebug. You might see something more elaborate than you have see already (like a 301/302 response, I assume that you added -L to handle such a possibility?
  2. as it works when you check out the page via a browser, the page might attempt a referrer check and fail miserably because there is no referrer (hence the 500, a server-side error). The dump you created in 1. will show you what to insert with curl's -e option.
fvu