作者hikaru4 (靠北。小光)
看板PangSir
標題Re: [CN] HW2 關於RRQ和WRQ的ERROR問題
時間Sun May 16 23:00:55 2010
※ 引述《Zphoenix (細雨雙羊湖)》之銘言:
: ※ 引述《Bingojkt (-Bingo!-)》之銘言:
: 以下是助教經過討論之後的結果。
: : 請問助教
: : 1.在RRQ中,假如client端要求一個檔案"1.txt"
: : 可是"1.txt"在client端已經存在了,應該
: : (1)覆寫它 or (2)return "ERROR 6:File already exist"?
: (1)
: : 2.在WRQ中,假如client端要求寫入一個檔案"1.txt"
: : 可是client端並沒有"1.txt"這個檔案,應該
: : (1)寫入一個空白檔案 or (2)return "ERROR 1:File not found"?
: (2)
: 在這邊助教會將幾種可能的狀況做一點補充,
: 以下將做一個簡單的說明:
: RRQ:
: RRQ
: Client ──→ Server
: 1.txt
: Case 1:
: Server 無 1.txt → Error 1: File not found
: Case 2:
: Client 有 1.txt → (Overwrite)
: ---
: WRQ:
: WRQ
: Client ──→ Server
: 1.txt
: Case 1:
: Server 有 1.txt → Error 6: File already exists
: Case 2:
: Client 無 1.txt → Error 1: File not found
: TA 楊博翔
助教你好 想請問一下最後一個情況 WRQ client 無 1.txt 時
Error 1:file not found 這個訊息是誰要傳給誰的?
我自己的想法是client自己show出找不到檔案就好
client端跟server端之間不需要有任何封包傳遞
這樣的想法是否正確?
如果對的話 是不是也不用特地秀出 Error 1 這個錯誤訊息
只要秀出client端找不到檔案 然後client端自己處理掉就好?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.91.80
1F:推 freshJC:只要有印出File Not Found類似訊息就可以。 05/16 23:25
2F:→ freshJC:實際上的確是你所講的沒錯。:) 05/16 23:25
3F:→ hikaru4:謝謝助教迅速回應~~ 05/16 23:36