p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: code trouble with netscape


Message #1 by "George Lanitis" <glanitis@c...> on Fri, 24 Mar 2000 11:39:35 -0500
When dynamically building a URL with your code, the URL may work fine in IE 
but Netscape presents this ERROR message:
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.

Use Server.URLEncode when passing parameters so that characters within the 
data are encoded properly (spaces replaced with "+", etc.).

This is bad:
<%
URL="wherever.asp"
part1="fname=Joe"
part2="&company=Bait Shop"
part3="&fax=703-277-2233"
response.redirect URL & "?" & part1 & part2 & part3
%>

This is good:
<%
URL="wherever.asp"
part1="fname=" & server.URLencode("Joe")
part2="&company=" & server.URLencode("Bait Shop")
part3="&fax=" & server.URLencode("703-277-2233")
response.redirect URL & "?" & part1 & part2 & part3
%>




At 12:26 PM 3/24/00 -0500, you wrote:
>the error is:
>
>HTTP Error 405
>
>405 Method Not Allowed
>
>The method specified in the Request Line is not allowed for the resource
>identified by the request. Please ensure that you have
>the proper MIME type set up for the resource you are requesting.
>
>Please contact the server's administrator if this problem persists.
>+++
>i dont know what is causing it since i deleted all asp code and still get
>error. this works with ie4.
>
>cookie is temp only for session
>thks
>----- Original Message -----
>From: Robert Chartier <Robert.Chartier@T...>
>To: Code Clinic <proasp_codeclinic@p...>
>Sent: Friday, March 24, 2000 11:50 AM
>Subject: [proasp_codeclinic] RE: code trouble with netscape
>
>
> >
> > gawd...your storing cart information on the client via cookies???
> >
> >
> > wow. yikes...
> >
> >
> > either way, can you post the exact mime error?  are you sure its in your
> > cookie code?
> >
> > what is this =3D = all over the place?  email post error or code?
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: George Lanitis
> > Sent: Friday, March 24, 2000 8:40 AM
> > To: Code Clinic
> > Subject: [proasp_codeclinic] code trouble with netscape
> >
> >
> >
> >
> > the following code works great in ie4 but gives error mime not valid or 
> > some such error abt mime under netscape
> >
> > any ideas
> >
> > <%
> > ' PUT THE SELECTED ITEM'S INFO INTO A DYNAMIC COOKIE TO BUILD SHOPPING 
> > CART
> > dim count
> > count =3D cint(request.cookies("cart").count)/4
> > response.cookies("cart")("product" & (count + 1)) =3D 
> > request.queryString("NameCode")
> > response.cookies("cart")("size" & (count + 1)) =3D 
> > request.queryString("Size")
> > response.cookies("cart")("quantity" & (count + 1)) =3D 
> > request.queryString("quantity")
> > response.cookies("cart")("price" & (count + 1)) =3D 
> > request.queryString("Amount")
> >
> > ' REDIRECT TO THE SHOPPING CART
> > response.redirect("viewCart.asp")
> > %>
> > <html>
> >
> > <!--
> >        
> >         This routine adds items to the shopping cart.
> >         Count represents the number of items in the cart.  Divide by 
> > four since
> >          four items being kept to get to number of individual items.
> >          Once items in cart then redirected to view the cart.
> >         
> >          This page does not display.
> > -->
> >
> > <head>
> > <title>Add To Cart</title>
> > </head>
> >
> > <body>
> > </body>
> >
> > </html>
> >
> > ---
> > You are currently subscribed to proasp_codeclinic.
> > $subst('Email.Unsub')
> >
> > ---
> > You are currently subscribed to proasp_codeclinic.
>$subst('Email.Unsub')
> >
>
>
>---
>You are currently subscribed to proasp_codeclinic.


  Return to Index