Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6199437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:11:20+00:00 2026-05-24T04:11:20+00:00

after executing post method on the server i get this error: HTTP/1.1 302 Found,

  • 0

after executing post method on the server i get this error: HTTP/1.1 302 Found, which as i know states that there is a redirect that follows. I am trying to fill in the logon form and post it to server, after doing so, i get this redirect.

P.S. The form submit method is postback.. maybe this is a key?

P.P.S. After posting this:

__VIEWSTATE=&__EVENTTARGET=&__EVENTARGUMENT=&ctl00$tbUsername=qwerty&ctl00$tbPwd=qwerty&ctl00$chkRememberLogin=0&ctl00$cmdLogin=Login&ctl00$cmdForgetMe=Forget Me

I get this:

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="http://website/mobile/(X(1)S(lyslolvcdq13af45juum2vel))/Login.aspx?ReturnUrl=%2fsyspower3%2fmobile%2fdefault.aspx&amp;AspxAutoDetectCookieSupport=1">here</a>.</h2>
</body></html>

Plus the set of headers:

08-02 13:48:39.084: INFO/System.out(1853): ====Header=====
08-02 13:48:39.084: INFO/System.out(1853): Cache-Control
08-02 13:48:39.084: INFO/System.out(1853): private
08-02 13:48:39.084: INFO/System.out(1853): ====Header=====
08-02 13:48:39.084: INFO/System.out(1853): Content-Type
08-02 13:48:39.084: INFO/System.out(1853): text/html; charset=utf-8
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.093: INFO/System.out(1853): Expires
08-02 13:48:39.093: INFO/System.out(1853): Tue, 02 Aug 2011 13:48:33 GMT
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.093: INFO/System.out(1853): Server
08-02 13:48:39.093: INFO/System.out(1853): Microsoft-IIS/7.5
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.093: INFO/System.out(1853): Set-Cookie
08-02 13:48:39.093: INFO/System.out(1853): ASP.NET_SessionId=ebmsrf45wb3mcq45qrgrfe55; path=/; HttpOnly
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): X-AspNet-Version
08-02 13:48:39.104: INFO/System.out(1853): 2.0.50727
08-02 13:48:39.104: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): X-Powered-By
08-02 13:48:39.104: INFO/System.out(1853): ASP.NET
08-02 13:48:39.104: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): Date
08-02 13:48:39.104: INFO/System.out(1853): Tue, 02 Aug 2011 13:48:33 GMT
08-02 13:48:39.104: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): Content-Length
08-02 13:48:39.104: INFO/System.out(1853): 1272

EDITED:
Now i can see the new location that I must proceed to. But here is a new problem, when i enter this new link into the browser, i get into the server(i pass login), but if I do a new request(POST) to server, then i am being thrown back to the login page…

P.S. Now i am using HttpURLConnection for the post method

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:11:20+00:00Added an answer on May 24, 2026 at 4:11 am

    That’s not an error. That’s just an informal message that there’s a redirect. Only HTTP 4nn and 5nn responses are real errors. The redirect URL is available in the HTTP Location header. You, as being a web client, are obligated to send a new GET request on the URL as specified in the HTTP Location header.

    String location = response.getLastHeader("Location").getValue();
    // ...
    

    Update: So, you got a HTTP 302 response without a Location header? What’s the status code of the response itself?

    int statusCode = response.getStatusLine().getStatusCode();
    

    If this is 200 and the body contains a 302 message, then it’s definitely a bug in the server side. The webserver should have returned a status code of 302 along with a Location header.


    Update 2: So, the status code is actually 200. That’s a bug in the server side. If that website is not under your control and thus you cannot fix the server, then you need to report it to the admin/maintainer of the website. In the meanwhile, best what you could do is to extract the new location from the response body using some HTML parser and then send a new GET request on it. For example, using Jsoup:

    String location = Jsoup.parse(responseHtml).select("h2 a").first().attr("href");
    // ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just reading this post When is IHttpModule.Dispose method called? I found this
In Javascript, after executing a function I can immediately get the an element of
I have an awesome trouble with Gem. After executing this command: rm -f /usr/local/lib/ruby/gems/1.9.1/cache/*
I have a WCF service with many methods. I would like that after executing
I have a jquery that has first server function call using post and next
I know you can have post build command line events... executing a batch file,
How can I render after executing an action in a restful controller instead of
I am getting Incorrect syntax near the keyword 'select' after executing the following code.
I'm building an application in Java to retrieve data from MySQL database. After executing
I'm reading The Art of Assembly: The MMX Instruction Set , After executing some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.