웹상의 파일을 바로 중간부분부터 다운로드가 가능한가요?

COMPiSE의 이미지

웹상의 파일을 다운로드 할 때,
그 파일의 중간부터 받을 수 있는지요?
플래쉬겟 같은 이어받기 프로그램을 생각해 보면,
가능할 것 같기도 한데,..
어느 방향을 공부해야 되는지 감을 못잡겠네요..^^;

다시 말씀드리면, 웹상의 redhat.iso 라는 600MB 짜리 파일이 존재할 때,
딱 그 중간부분부터 다운로드 받아서, 파일 끝까지 300MB 짜리 파일로 다운 받는 것이
가능한지를 여쭤보는 것입니다.^^;

물론 그 앞부분의 300MB 에 대해서는 Don't care 해야 겠죠..

고수님들의 조언 부탁드립니다.

markboy의 이미지

http://curl.haxx.se/

여기에 있는 curl 유틸리티와 libcurl 을 보시면 될 것 같습니다. curl 사용법을 보다보면

Quote:
RANGES

With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
to get only one or more subparts of a specified document. Curl supports
this with the -r flag.

Get the first 100 bytes of a document:

curl -r 0-99 http://www.get.this/

Get the last 500 bytes of a document:

curl -r -500 http://www.get.this/

Curl also supports simple ranges for FTP files as well. Then you can only
specify start and stop position.

Get the first 100 bytes of a document using FTP:

curl -r 0-99 ftp://www.get.this/README

이런식으로 문서 일부를 가져올 수 있게 되어있습니다. :)

익명 사용자의 이미지

넵 가능합니다.
그래서 download accelerator 이나 getright 와 같은 프로그램들이 만들어 질 수 있는거죠.

mach의 이미지

markboy wrote:

...
이런식으로 문서 일부를 가져올 수 있게 되어있습니다.
...

사족을 달자면, 서버가 해당 프로토콜을 지원해야만 가능합니다.
클라이언트를 cURL을 이용해 개발한다면, 클라이언트는 지원이 될테고,
서버도 지원해야 합니다.
즉, 클라이언트 서버 둘다가 지원해야 가능하다는......

------------------ P.S. --------------
지식은 오픈해서 검증받아야 산지식이된다고 동네 아저씨가 그러더라.

cjh의 이미지

mach wrote:
markboy wrote:

...
이런식으로 문서 일부를 가져올 수 있게 되어있습니다.
...

사족을 달자면, 서버가 해당 프로토콜을 지원해야만 가능합니다.
클라이언트를 cURL을 이용해 개발한다면, 클라이언트는 지원이 될테고,
서버도 지원해야 합니다.
즉, 클라이언트 서버 둘다가 지원해야 가능하다는......

HTTP/1.1의 Range support가 됩니다만, 많이 쓰는 웹 서버는 모두 지원하고 있으므로 큰 걱정을 안해도 됩니다. apache, iis, thttpd 정도가 아니라면 한번 웹 서버 매뉴얼을 보셔야 겠죠.

--
익스펙토 페트로눔

익명 사용자의 이미지

답변주신분들 감사드립니다.

큰 도움이 되었습니다.^^;

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.