Link to home
Start Free TrialLog in
Avatar of scotiaceilidh
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?


 
Avatar of scotiaceilidh
scotiaceilidh

ASKER

Adjusted points from 35 to 45
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
Thats waht I think too.  I have implemented this code,

<a href="OneIdea.asp?BrightID=<%URLEncode(Response.Write(v_list_brightidea(0,x)))%>"><%response.write(x+1 & ".  " & v_list_brightidea(1,x)& "<br>")%></a>

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
Might need to be:

<a href="OneIdea.asp?BrightID=<%=URLEncode(Response.Write(v_list_brightidea(0,x)))%>"><%response.write(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
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.
It's typically done like this:

response.write server.urlencode(whatever)

Not like this:

server.urlencode(response.write(whatever))

<a href="OneIdea.asp?BrightID=<%=Server.URLEncode(v_list_brightidea(0,x))%>"><% response.write x+1 & ".  " & v_list_brightidea(1,x) & "<br>"%></a>
ASKER CERTIFIED SOLUTION
Avatar of clockwatcher
clockwatcher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial