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. Web Development
  3. Questions about the HTTP protocol

Questions about the HTTP protocol

Scheduled Pinned Locked Moved Web Development
rubyc++databasehtmlcss
6 Posts 3 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.
  • C Offline
    C Offline
    chasetoys
    wrote on last edited by
    #1

    Hey folks... I'd love your help on the HTTP protocol, as I'm trying to integrate it with a client application I'm developing: Quick description of what I propose to do with the protocol: * Have a unique URI (mydomain.com/uniqueID) and then go via my C++ MFC client and hit that URI. * Perform server side code to determine whether there are new files to download * Files are all web content files with the exception of .txt files (so JPEGs, HTML, CSS, etc....) * If there are new files to download, I want the client to download *all of it at once*..., effectively downloading all the files from server using the HTTP protocol. * If there are not new files to download, I'd like for the client to download nothing. * I would also like to upload .txt files to the server ever hour, read their contents, and insert/update them into my database schema. * I'd like to use Ruby On Rails if this makes a difference. Here are my questions: 1) Can the HTTP protocol download multiple files (say 10 HTML files, 20 JPEGs, 10 CSS files) from one URI at once? 1.5) Can HTTP protocol be used to download .txt files? 1.6) Is there anything that the HTTP protocol cannot be used to download? 2) Will my proposed solution of domain.com/uniqueID work? 3) Can HTTP actually be used to upload the text file to the server? 4) Is there a nice way of re-assembling the packets on the Windows side into HTML, JPEG files, etc...? Such as an existing module or source/tutorials you might know of. 5) May I use port 80 on the Windows client side, since the type of traffic I'm transferring is web content. 6) Is there some way Windows checks to make sure only web content files are being transferred over port 80? 7) Is there a good intro/primer for sockets programming on the Windows side? Thank you so much in advance! -chasetoys -- modified at 1:13 Saturday 13th May, 2006

    L 1 Reply Last reply
    0
    • C chasetoys

      Hey folks... I'd love your help on the HTTP protocol, as I'm trying to integrate it with a client application I'm developing: Quick description of what I propose to do with the protocol: * Have a unique URI (mydomain.com/uniqueID) and then go via my C++ MFC client and hit that URI. * Perform server side code to determine whether there are new files to download * Files are all web content files with the exception of .txt files (so JPEGs, HTML, CSS, etc....) * If there are new files to download, I want the client to download *all of it at once*..., effectively downloading all the files from server using the HTTP protocol. * If there are not new files to download, I'd like for the client to download nothing. * I would also like to upload .txt files to the server ever hour, read their contents, and insert/update them into my database schema. * I'd like to use Ruby On Rails if this makes a difference. Here are my questions: 1) Can the HTTP protocol download multiple files (say 10 HTML files, 20 JPEGs, 10 CSS files) from one URI at once? 1.5) Can HTTP protocol be used to download .txt files? 1.6) Is there anything that the HTTP protocol cannot be used to download? 2) Will my proposed solution of domain.com/uniqueID work? 3) Can HTTP actually be used to upload the text file to the server? 4) Is there a nice way of re-assembling the packets on the Windows side into HTML, JPEG files, etc...? Such as an existing module or source/tutorials you might know of. 5) May I use port 80 on the Windows client side, since the type of traffic I'm transferring is web content. 6) Is there some way Windows checks to make sure only web content files are being transferred over port 80? 7) Is there a good intro/primer for sockets programming on the Windows side? Thank you so much in advance! -chasetoys -- modified at 1:13 Saturday 13th May, 2006

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2
      1. Yes 1.5) Yes 1.6) Kitchen Sink 2) Yes but also see WebService 3) Yes 4) Yes many different encodings are supported see HTTP Content-type header 5) Yes 6) Not native but with additional software it could happen. 7) Sockets.com Have no idea what the goal is for you but for updating files on a client machine also see BITS on MSDN[^] And this...[^]

      "What classes are you using ? You shouldn't call stuff if you have no idea what it does"
      Christian Graus in the C# forum

      led mike

      C 1 Reply Last reply
      0
      • L led mike
        1. Yes 1.5) Yes 1.6) Kitchen Sink 2) Yes but also see WebService 3) Yes 4) Yes many different encodings are supported see HTTP Content-type header 5) Yes 6) Not native but with additional software it could happen. 7) Sockets.com Have no idea what the goal is for you but for updating files on a client machine also see BITS on MSDN[^] And this...[^]

        "What classes are you using ? You shouldn't call stuff if you have no idea what it does"
        Christian Graus in the C# forum

        led mike

        C Offline
        C Offline
        chasetoys
        wrote on last edited by
        #3

        Mike: Thanks for your response, couple questions, 1) What prevents applictaions from transferring everything over port 80.... I thought firewalls protect agianst non HTTP looking things getting downloaded over port 80. 2) If you are using port 80, what if there are other applictions trying to use that port? You can't transfer bits simultaneously over one connection right? 3) Web Service? How does this work, and would I want to use this over BITS? Lookin forward to hearing from you, chasetoys -- modified at 4:45 Saturday 13th May, 2006

        C 1 Reply Last reply
        0
        • C chasetoys

          Mike: Thanks for your response, couple questions, 1) What prevents applictaions from transferring everything over port 80.... I thought firewalls protect agianst non HTTP looking things getting downloaded over port 80. 2) If you are using port 80, what if there are other applictions trying to use that port? You can't transfer bits simultaneously over one connection right? 3) Web Service? How does this work, and would I want to use this over BITS? Lookin forward to hearing from you, chasetoys -- modified at 4:45 Saturday 13th May, 2006

          C Offline
          C Offline
          chasetoys
          wrote on last edited by
          #4

          I'm trying to think of the overall picture of how this would work. And I'd like to run some more questions by you: More Thoughts: * I guess I'd want to run Apache on a Linux box to be the web server * I'd like to use RubyOnRails to be the dynamic language that determines whether there is new web content to download * I'd like to use BITS (Background Intelligent Transfer Service) on the Windows side, to transfer data over HTTP? More questions: * Can .txt files be transferred over the HTTP protocol without firelarms raising an alarm? * Is there a reason I should *NOT* use BITS on the Windows side to facilitate the transfer? It has a bunch of useful features it seems. If not, what method would you reccomend? * Does Apache with RubyOnRails meet the following qualifications of BITS?: Background Intelligent Transfer Service BITS supports HTTP and HTTPS downloads and uploads and requires that the server supports the HTTP/1.1 protocol. For downloads, the HTTP server's Head method must return the file size and its Get method must support the Content-Range and Content-Length headers. As a result, BITS only transfers static file content and generates an error if you try to transfer dynamic content, unless the ASP, ISAPI, or CGI script supports the Content-Range and Content-Length headers. BITS can use an HTTP/1.0 server as long as it meets the Head and Get method requirements. To support downloading ranges of a file, the server must support the following requirements: * Allow MIME headers to include the standard Content-Range and Content-Type headers, plus a maximum of 180 bytes of other headers. * Allow a maximum of two CR/LFs between the HTTP headers and the first boundary string. Thanks so much!!! Edit/Delete Message

          L R 2 Replies Last reply
          0
          • C chasetoys

            I'm trying to think of the overall picture of how this would work. And I'd like to run some more questions by you: More Thoughts: * I guess I'd want to run Apache on a Linux box to be the web server * I'd like to use RubyOnRails to be the dynamic language that determines whether there is new web content to download * I'd like to use BITS (Background Intelligent Transfer Service) on the Windows side, to transfer data over HTTP? More questions: * Can .txt files be transferred over the HTTP protocol without firelarms raising an alarm? * Is there a reason I should *NOT* use BITS on the Windows side to facilitate the transfer? It has a bunch of useful features it seems. If not, what method would you reccomend? * Does Apache with RubyOnRails meet the following qualifications of BITS?: Background Intelligent Transfer Service BITS supports HTTP and HTTPS downloads and uploads and requires that the server supports the HTTP/1.1 protocol. For downloads, the HTTP server's Head method must return the file size and its Get method must support the Content-Range and Content-Length headers. As a result, BITS only transfers static file content and generates an error if you try to transfer dynamic content, unless the ASP, ISAPI, or CGI script supports the Content-Range and Content-Length headers. BITS can use an HTTP/1.0 server as long as it meets the Head and Get method requirements. To support downloading ranges of a file, the server must support the following requirements: * Allow MIME headers to include the standard Content-Range and Content-Type headers, plus a maximum of 180 bytes of other headers. * Allow a maximum of two CR/LFs between the HTTP headers and the first boundary string. Thanks so much!!! Edit/Delete Message

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            I am not aware of a BITS implementation for Linux.

            chasetoys wrote:

            Can .txt files be transferred over the HTTP protocol without firelarms raising an alarm?

            Like any software firewalls can do whatever they want. Each one has whatever capabilities the creator gave it. Besides that they are highly configurable and each owner will have it configured however they prefer. The bottom line is there are no guarantees of what will get through a firewall..

            "What classes are you using ? You shouldn't call stuff if you have no idea what it does"
            Christian Graus in the C# forum

            led mike

            1 Reply Last reply
            0
            • C chasetoys

              I'm trying to think of the overall picture of how this would work. And I'd like to run some more questions by you: More Thoughts: * I guess I'd want to run Apache on a Linux box to be the web server * I'd like to use RubyOnRails to be the dynamic language that determines whether there is new web content to download * I'd like to use BITS (Background Intelligent Transfer Service) on the Windows side, to transfer data over HTTP? More questions: * Can .txt files be transferred over the HTTP protocol without firelarms raising an alarm? * Is there a reason I should *NOT* use BITS on the Windows side to facilitate the transfer? It has a bunch of useful features it seems. If not, what method would you reccomend? * Does Apache with RubyOnRails meet the following qualifications of BITS?: Background Intelligent Transfer Service BITS supports HTTP and HTTPS downloads and uploads and requires that the server supports the HTTP/1.1 protocol. For downloads, the HTTP server's Head method must return the file size and its Get method must support the Content-Range and Content-Length headers. As a result, BITS only transfers static file content and generates an error if you try to transfer dynamic content, unless the ASP, ISAPI, or CGI script supports the Content-Range and Content-Length headers. BITS can use an HTTP/1.0 server as long as it meets the Head and Get method requirements. To support downloading ranges of a file, the server must support the following requirements: * Allow MIME headers to include the standard Content-Range and Content-Type headers, plus a maximum of 180 bytes of other headers. * Allow a maximum of two CR/LFs between the HTTP headers and the first boundary string. Thanks so much!!! Edit/Delete Message

              R Offline
              R Offline
              Rei Miyasaka
              wrote on last edited by
              #6

              Read this (really good article): http://www.jmarshall.com/easy/http/[^]

              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