Announcement

Collapse
No announcement yet.

Can MvCALL specify a value for the User-Agent header?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can MvCALL specify a value for the User-Agent header?

    The title says it all ... I'm looking at a payment-module project that may require a custom value for the User-Agent request header. I know that there's a default value for this header in MvCALL requests; I've seen it occasionally during debugging. Can I override that by specifying a new one in the HEADERS attribute of MvCALL?

    Thanks --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    #2
    We don't set a User-Agent header in the engine. I believe all we set is Content-Length and sometimes the Content-Type (based on the METHOD attribute). You can set your own User-Agent header via the HEADERS attribute as you suggested.
    David Carver
    Miva, Inc. | Software Developer

    Comment


      #3
      I ran into this a couple of years ago. Here is a sanitized version of the MvCall I used to send a User-Agent header, which was required by a certain site to load data from them:

      <MvCALL ACTION="{'https://www.xyz.com/Parts/Details?' $ l.mfrcode}" METHOD="GET" HEADERS="User-Agent: MySiteBot +www.mysite.com">

      Comment

      Working...
      X