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. HTTP File Download??

HTTP File Download??

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminxmlhelpquestion
4 Posts 3 Posters 1 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.
  • X Offline
    X Offline
    xxhimanshu
    wrote on last edited by
    #1

    :confused::confused:Hi All, I have an application to download three XML files. Each one of them can be 1 MB or more. that makes my all of the system resources to be taken by it to download the file. I am downloading them from my server. I want to do something like this that i can compare the files local and remote one and if there are any changes i can just copy the changes to the local file. That will save my downloading whole files again and again even if they are same. can i do that. Please help..Any help or pointers are thoroughly appreciated....Thanks a lot in advance.. Regards, Himanshu

    V P 2 Replies Last reply
    0
    • X xxhimanshu

      :confused::confused:Hi All, I have an application to download three XML files. Each one of them can be 1 MB or more. that makes my all of the system resources to be taken by it to download the file. I am downloading them from my server. I want to do something like this that i can compare the files local and remote one and if there are any changes i can just copy the changes to the local file. That will save my downloading whole files again and again even if they are same. can i do that. Please help..Any help or pointers are thoroughly appreciated....Thanks a lot in advance.. Regards, Himanshu

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      One solution is to design the internal applications that processes the XML file to update a CRC check output for all the XML files. The client applications could quickly download the CRC output and compare it with the most recent downloaded one. Kuphryn

      1 Reply Last reply
      0
      • X xxhimanshu

        :confused::confused:Hi All, I have an application to download three XML files. Each one of them can be 1 MB or more. that makes my all of the system resources to be taken by it to download the file. I am downloading them from my server. I want to do something like this that i can compare the files local and remote one and if there are any changes i can just copy the changes to the local file. That will save my downloading whole files again and again even if they are same. can i do that. Please help..Any help or pointers are thoroughly appreciated....Thanks a lot in advance.. Regards, Himanshu

        P Offline
        P Offline
        Paul M Watt
        wrote on last edited by
        #3

        use the "If-modified-since:" header in your request for that file and send the GMT time of the last update date for the file you are requesting. The HTTP server will compare the time that you send with the time of the file and only send back the file on the server if it is newer. IF your file is newer on your machine, you will get a status code 304 indicating that your file is newer.


        Build a man a fire, and he will be warm for a day
        Light a man on fire, and he will be warm for the rest of his life!

        X 1 Reply Last reply
        0
        • P Paul M Watt

          use the "If-modified-since:" header in your request for that file and send the GMT time of the last update date for the file you are requesting. The HTTP server will compare the time that you send with the time of the file and only send back the file on the server if it is newer. IF your file is newer on your machine, you will get a status code 304 indicating that your file is newer.


          Build a man a fire, and he will be warm for a day
          Light a man on fire, and he will be warm for the rest of his life!

          X Offline
          X Offline
          xxhimanshu
          wrote on last edited by
          #4

          :confused:Hi Paul, Thanks for the information..But i havent done anything like this before..I would highly appreciate if u can send me any example...of how to do that..Please..I need it urgently...Thanks a lot in advance.. regards, Himanshu

          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