Passa al contenuto principale

Selezione dello schema: XRSQ

XRSQ è il mezzo con cui un programma utente può verificare l'implementazione di XRSQ/XRCP, selezionare un particolare schema, azzerarne lo stato e persino condurre una rudimentale negoziazione. Il suo formato è simile a quello del comando TYPE, come segue:

XRSQ [<SP> <scheme>] <CRLF>

<scheme> = a single character. The following are defined:
R Recipients first. If not implemented, T must be.
T Text first. If this is not implemented, R must be.
? Request for preference. Must always be implemented.

No argument means a "selection" of none of the schemes (the
default).

Replies:
200 OK, we'll use specified scheme.
215 <scheme> This is the scheme I prefer.
501 I understand XRSQ but can't use that scheme.
5xx Command unrecognized or unimplemented.
See Appendix A for more about the choice of reply codes.

Qui vanno evidenziati tre aspetti di XRSQ. Il primo è che un XRSQ senza argomento deve sempre restituire una risposta 200 e ripristinare lo stato predefinito in cui non è selezionato alcuno schema. Qualsiasi altra risposta implica che XRSQ, e quindi XRCP, non è compreso o non può essere eseguito correttamente.

Il secondo è che l'uso di "?" come <scheme> chiede al server FTP di restituire una risposta 215 in cui il server specifica uno schema "preferito". Il formato di questa risposta è semplice:

215 <SP> <scheme> [<SP> <arbitrary text>] <CRLF>

Any other reply (e.g. 4xx or 5xx) implies that XRSQ and XRCP are
not implemented, because "?" must always be implemented if XRSQ
is.

Il terzo aspetto importante di XRSQ è che ha sempre l'effetto collaterale di riportare tutti gli schemi al loro stato iniziale. Questo azzeramento deve essere eseguito qualunque sia la risposta - 200, 215 o 501. Le azioni necessarie per un azzeramento verranno spiegate quando si discuterà di come funziona effettivamente ciascuno schema.