UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2007-05-31 11:10 PM

cumptrnrd
Guest

Re: wget functionality

#2 2007-06-01 12:19 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: wget functionality

I guess you could wget to stdout and pipe it to your program, but that's a bit awkward too. What about using libcurl?

As for waste of time, only if you need to wait till the download completed. If you don't mind that, you can just use mmap to avoid the extra read (and download to tmpfs if you don't want to hit the disk at all).

Offline

#3 2007-06-01 02:23 AM

jfriesne
Administrator
From: California
Registered: 2005-07-06
Posts: 348
Website

Re: wget functionality

Offline

#4 2007-06-01 11:26 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: wget functionality

Disadvantage of that is that if something weird happens, like a redirection, a cookie that's sent, or something else unexpected, your program won't be able to handle it.

Offline

#5 2007-06-11 08:30 AM

mlampkin
Administrator
From: Sol 3
Registered: 2002-06-12
Posts: 911
Website

Re: wget functionality

Gonna go with i3839 on this...

With the addition... that its not just re-directs ( and lil things like doing the name resolution, checking re-direct recursion, chunked or non-chunked data and so forth )...

Even that aside... 'normal' http servers aren't normal... 

E.g. look at the spec for eol ( \r\n ) then look at how many do \n or \r or \n\r... and if you write your own code for what should be simple functionality - u end up dealing with all those brain dead servers out there ( and may the gods help you if you send an inquiry to the folks who wrote the code - lol )...


Michael


"The only difference between me and a madman is that I'm not mad."

Salvador Dali (1904-1989)

Offline

#6 2008-09-27 02:55 AM

yuqingeng2005
Guest

Re: wget functionality

White House fenceSome excitement at the White House yesterday. The Secret Service caught a man trying to climb over the White House fence. ... When they caught the man, the Secret Service said, 'Not so fast. You have three more years, Mr. President. 1]11

Board footer

Powered by FluxBB