Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How do I form the HTTP headers to DL a .CAB file?

How do I form the HTTP headers to DL a .CAB file?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhtmlsysadminhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Terry ONolley
    wrote on last edited by
    #1

    I am getting server errors when trying to download a CAB file from a webserver. I think the problem is that the default headers don't allow for CAB file mime type. What string do I need to use in my call to CHttpFile.AddRequestheaders(); to get this file? I believe this is the problem, because if I change the URL to point to an HTML page, but leave everything else the same, then the file downloads just fine. Thanks! (I am also posting this in the Web Develpment forum)


    //placeholder for witty verbiage

    A 1 Reply Last reply
    0
    • T Terry ONolley

      I am getting server errors when trying to download a CAB file from a webserver. I think the problem is that the default headers don't allow for CAB file mime type. What string do I need to use in my call to CHttpFile.AddRequestheaders(); to get this file? I believe this is the problem, because if I change the URL to point to an HTML page, but leave everything else the same, then the file downloads just fine. Thanks! (I am also posting this in the Web Develpment forum)


      //placeholder for witty verbiage

      A Offline
      A Offline
      Alexander M
      wrote on last edited by
      #2

      does "GET /.../.../foo.cab" really not work? Don't try it, just do it! ;-)

      T 1 Reply Last reply
      0
      • A Alexander M

        does "GET /.../.../foo.cab" really not work? Don't try it, just do it! ;-)

        T Offline
        T Offline
        Terry ONolley
        wrote on last edited by
        #3

        You won't believe this - when I read your response I changed my mindset from "Why does it work with an HTM file but not a CAB file" to "It is supposed to work with a CAB file, so what else could be wrong?" because of the way you worded it :) Thanks! When I changed the #define from my clients production server to my test server, I forgot to change the #define'd path from my client's path to the path on my server :-O Of course it works just fine now :) Thanks for the push in the right direction!


        //placeholder for witty verbiage

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups