LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 11-07-2003, 12:26 AM   #1
seidren
Member
 
Registered: May 2003
Distribution: Ubuntu, Windows XP
Posts: 90

Rep: Reputation: 16
How does file downloading happen in HTTP and FTP


My Computer Science teacher just got me confused.

In FTP, you connect to port 21 and login and then a command link is opened and it is kept open.
Commands are sent through the command link and when you transfer files, a data link is opened and the file is transfered through that link.

I want to know if what I just said was right.

Are these command links and data links actually other free ports on the Server and Client.

And does the same thing apply to HTTP.

Can anyone please explain exactly how a file download happens in HTTP?

Thanks in advance,
Denesh.
 
Old 11-07-2003, 10:49 AM   #2
Whitehat
Senior Member
 
Registered: Feb 2003
Location: The Cold North
Distribution: SuSE 9.1
Posts: 1,289

Rep: Reputation: 46
Re: How does file downloading happen in HTTP and FTP

Quote:
Originally posted by seidren
If the world was one big computer
simulation, then God must have been a
heck of a programmer.
In response to your signature:

I can guarentee you he writes some really tight code.



Come on....He's God!
 
Old 11-07-2003, 11:26 AM   #3
evil_Tak
Member
 
Registered: Oct 2003
Distribution: Debian/unstable
Posts: 85

Rep: Reputation: 15
Yes, FTP (control) connections are made on port 21, but data transfer happens on port 20, in passive mode, or some random high port, depending on the particular ftp server, in active mode.
 
Old 11-07-2003, 05:10 PM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
and during http session you are still connected to port 80 on the server with a hiher port on your client, as soon as you start downloading you are opening up another http session, your browser configured such way so it either launches a downloader or opens up a file if there is a derective that tells the browser to open such file with a helper application rather than save it to your harddrive.
 
Old 11-09-2003, 08:59 AM   #5
seidren
Member
 
Registered: May 2003
Distribution: Ubuntu, Windows XP
Posts: 90

Original Poster
Rep: Reputation: 16
I want to know how the webserver sends the file.

Does it sends through its port 80 or does it open another port and send it through that??

And about the signature, Just think about it. When writing a game, you are creating your own world, where you are god. Think about the one who made the world we are in. He actually made us think about him !!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any somebody tell me HOW can I get the file list from ftp(http) server by wget? wuzhong Linux - Networking 2 09-07-2004 08:17 AM
ftp downloading evaluator Linux - Software 4 10-09-2003 10:27 AM
Downloading Slack 9.1 Via FTP Help Psyman014 Slackware 2 10-02-2003 01:49 AM
http vs. ftp mikeshn Linux - Networking 3 05-29-2002 01:42 AM
Problem downloading via FTP pergesu Linux - Networking 3 01-07-2002 01:18 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration