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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kent Multer
    Mega Mivite









    • Mar 2006
    • 3252

    #1

    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
  • dcarver
    Director of Software Dev.




    • May 2013
    • 400

    #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

    • BigDummy
      Mini Mivite

      • Mar 2009
      • 52

      #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