On Mon, 31 Aug 1998, Ma Xin wrote:
> e.g. the end user request a English webpage, squid will get it either from
> the original site or from the cache, translate it to French and send it
> back to the end user.
>
> what I want to know is which part of the source code I should modify. I
> have read through the src and found the store_client.c maybe the one to be
> worked with. Am I right?
If you do it on the client side (client_side.c), then the processing would
have to be done for every request to an object. If you process incoming
objects on the server side (http.c, ftp.c, etc.), then the processed objects
would get cached (if possible), effectively requiring only one processing
pass per object regardless of the number of requests to that object.
Thus, the latter approach is more efficient, but it has a possible
disadvantage: you cannot decide which version of the document to serve
(processed or original) based on the client identity or client request.
Wherever you do it, it would not be a trivial change because the proxy is not
supposed to modify the documents, and some things in HTTP depend on that.
Finally, note that "translating" every object that comes though a proxy
(regardless of the request) is probably a severe violation of HTTP. Imagine
that NLANR caches would translate all their traffic to Latin and insert
pictures of nude Squid hackers along the way!
A more HTTP-friendly way would be translating every object that came with
some special HTTP header, like
Accept: */*; language="fr"
X-Translate: yes
Alternatively, you can look at what sites like www.altavista.digital.com
offer in terms of translation.
$0.02,
Alex.
Received on Tue Jul 29 2003 - 13:15:53 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:54 MST