Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 895077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:30:04+00:00 2026-05-15T14:30:04+00:00

How can I read file from server starting with some offset (Similar behavior to

  • 0

How can I read file from server starting with some offset (Similar behavior to wget -c)? What headers I must send to server? What futures must server support?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:30:05+00:00Added an answer on May 15, 2026 at 2:30 pm

    You should use the Range header in the request. But you may use it only if the server informs you that it accept range request by Accept-Ranges response header.

    This is an example session. Suppose we are interested in getting a part of this picture. First, we send a HTTP HEAD request to determine: a) if the server supports byte ranges, b) the content-length:

    > HEAD /2238/2758537173_670161cac7_b.jpg HTTP/1.1
    > Host: farm3.static.flickr.com
    > Accept: */*
    > 
    < HTTP/1.1 200 OK
    < Date: Thu, 08 Jul 2010 12:22:12 GMT
    < Content-Type: image/jpeg
    < Connection: keep-alive
    < Server: Apache/2.0.52 (Red Hat)
    < Expires: Mon, 28 Jul 2014 23:30:00 GMT
    < Last-Modified: Wed, 13 Aug 2008 06:13:54 GMT
    < Accept-Ranges: bytes
    < Content-Length: 350015
    

    Next, we send a GET request with the Range header asking for the first 11 bytes of the picure:

    > GET /2238/2758537173_670161cac7_b.jpg HTTP/1.1
    > Host: farm3.static.flickr.com
    > Accept: */*
    > Range: bytes=0-10
    > 
    < HTTP/1.1 206 Partial Content
    < Date: Thu, 08 Jul 2010 12:26:54 GMT
    < Content-Type: image/jpeg
    < Connection: keep-alive
    < Server: Apache/2.0.52 (Red Hat)
    < Expires: Mon, 28 Jul 2014 23:30:00 GMT
    < Last-Modified: Wed, 13 Aug 2008 06:13:54 GMT
    < Accept-Ranges: bytes
    < Content-Range: bytes 0-10/350015
    < Content-Length: 11
    < 
    

    This is a hex dump of the first 11 bytes:

    00000000  ff d8 ff e0 00 10 4a 46  49 46 00                 |......JFIF.|
    0000000b
    

    For more info see the Range header specification in HTTP RFC 2616.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.