0

please what is that do and mean??

message = ("HTTP/1.1 302 Found\r\n" + "Location: http://" + redirectionAddress + "/\r\n" + "Content-Length: 0\r\n" + "Connection: close\r\n" + "Cache-Control: max-age=0, no-store, private\r\n" +
"\r\n");
where
redirectionAddress = nodeAddr + ":" + message;
and
message = "AuthKey" + ":" + "clientIP" + ":" + "serverIP";
buffer = message.getBytes();
message = new String(buffer);

i am very thank in advance to any help
redards
sarah

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

3
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by s.w.a
1

It is code to output a http response, that will use a temporary redirect to another page.

0

thank u very much for ur reply
please i want to know what each statment in that mean if u please don't annoyed by that,
and that is very kind of u

message = ("HTTP/1.1 302 Found\r\n" + "Location: http://" + redirectionAddress + "/\r\n" + "Content-Length: 0\r\n" + "Connection: close\r\n" + "Cache-Control: max-age=0, no-store, private\r\n" +
"\r\n");

best regards

1

This is just one statement, a string concatenation. Nothing more. It defines a HTTP response header.

0

please just a question is that redirection message appear as a link that i must click? or it just adjust the exist URL in the page??
thank you in advance
best regards

1

no.. it seems to be when the page loads through a submitted form before this action does it makes sense that an HTTP request is on process while it is having an action when a user submitted a form page. best example for this was Daniweb's registration or login page... after that it will do this script on the server similar to the one you posted above.

0

thank you very much for your reply and that helpful answer
Ok, so that require a click from me to confirm the connection, is that right? else the connection to the new page is not done and back me to the previous page


thank you in advance
best regards

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.