scotiaceilidh
asked on
Netscape HTTP error - 400 Bad Request
I get the following error in Netscape and not IE. I have a hyperlink, that is passing a value through the query string in order to retrieve a record from the database. Simple stuff, but this error is new to me. The query string looks normal. Any ideas?
HTTP Error 400
400 Bad Request
Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.
I just noticed that the Query string in IE is =%202 and Netscape is =2. How do I remedy this?
HTTP Error 400
400 Bad Request
Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.
I just noticed that the Query string in IE is =%202 and Netscape is =2. How do I remedy this?
Need to see how your query string is being generated. It looks like IE is encoding the string for the URL, and NS is not.
Tom
Tom
ASKER
Thats waht I think too. I have implemented this code,
<a href="OneIdea.asp?BrightID =<%URLEnco de(Respons e.Write(v_ list_brigh tidea(0,x) ))%>"><%re sponse.wri te(x+1 & ". " & v_list_brightidea(1,x)& "<br>")%></a>
The URLEncode is new. Does that look right?
<a href="OneIdea.asp?BrightID
The URLEncode is new. Does that look right?
"%20" is the URL encoding for a space... so perhaps
you're leaving an extra space in your coded query string.
But like Tom said, we'd need to actually see the
code to nail down the problem.
Is the query string variable showing up in the URL?
For example, if I passed a variable called "test" and
assigned it a value of 3, the URL should read:
www.myserver.com/mypage.asp?test=3
Does yours read this way, or is it showing up:
www.myserver.com/mypage.asp?=3
If you can show the code, that would help.
--JM
you're leaving an extra space in your coded query string.
But like Tom said, we'd need to actually see the
code to nail down the problem.
Is the query string variable showing up in the URL?
For example, if I passed a variable called "test" and
assigned it a value of 3, the URL should read:
www.myserver.com/mypage.asp?test=3
Does yours read this way, or is it showing up:
www.myserver.com/mypage.asp?=3
If you can show the code, that would help.
--JM
Might need to be:
<a href="OneIdea.asp?BrightID =<%=URLEnc ode(Respon se.Write(v _list_brig htidea(0,x )))%>"><%r esponse.wr ite(x+1 & ". " & v_list_brightidea(1,x)& "<br>")%></a>
Note the additional = sign
What is the HTML being generated by this new string? Can you run it and copy the generated URL (if it's not working)?
Tom
<a href="OneIdea.asp?BrightID
Note the additional = sign
What is the HTML being generated by this new string? Can you run it and copy the generated URL (if it's not working)?
Tom
ASKER
Here is the query string in Netscape
http://www.francesmeyer.com/OneIdea.asp?BrightID= 1
and here it is in IE;
http://www.francesmeyer.com/OneIdea.asp?BrightID=%201
So there is a space. I will try to reolve this. Is there easy fixes for this besides trim etc.
http://www.francesmeyer.com/OneIdea.asp?BrightID= 1
and here it is in IE;
http://www.francesmeyer.com/OneIdea.asp?BrightID=%201
So there is a space. I will try to reolve this. Is there easy fixes for this besides trim etc.
It's typically done like this:
response.write server.urlencode(whatever)
Not like this:
server.urlencode(response. write(what ever))
<a href="OneIdea.asp?BrightID =<%=Server .URLEncode (v_list_br ightidea(0 ,x))%>"><% response.write x+1 & ". " & v_list_brightidea(1,x) & "<br>"%></a>
response.write server.urlencode(whatever)
Not like this:
server.urlencode(response.
<a href="OneIdea.asp?BrightID
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER