User-Agent changing

Sarah Reichelt sarah.reichelt at gmail.com
Wed Apr 23 18:43:53 EDT 2008


> > > I was working on communications with a RevOnRockets-based web server,
> > > and I was checking the headers of the web request to see whether the
> > > request was coming from a Revolution program, or a browser. I had
> > > checked earlier and the headers included the line:
> > >  User-Agent: Revolution (MacOS)
> > > In the middle of a debugging session, this suddenly changed to:
> > >  User-Agent: Metacard (MacOS)
> > > How can this be?
> > >
> >
> > Genetic memory.
> >
>
>  Richard's right. :-)
>
>  libUrl sets the User-Agent header (unless you override it by setting the
> httpHeaders yourself). It sets it to Revolution (+ platform) if ("rev" is in
> the short name of me). Otherwise it sets it to Metacard. This is something
> to do with libUrl's history. (It should probably be updated.)
>
>  The libUrl script is usually contained in a button named "revLibUrl" in the
> revLibrary stack. I'm not sure what happens during debugging to alter this
> behavior.

Maybe "me" was the name of my stack at some stage, so it changed to
MetaCard. I might dig into the libURL script and fix this.
Thanks for the info Dave.

Cheers,
Sarah



More information about the Use-livecode mailing list