Improvement to my swat *.txt fix.

Pierre-Jules Tremblay trep at
Wed Sep 6 17:39:04 GMT 2000

A good starting point is the man page for "diff".  There are binaries 
around for just about every OS, including Win/Dos.

Therefore, you need to diff your file against the original and send the 
output to a samba team member.  The diff output can be fed to the "patch" 
program (man patch) to generate your file from the original + patch file.

Try it yourself, if you can patch your own mods to the original files, so 
can the Samba team.

P.S. By the way, all that CVS does to maintain versions is to accumulate a 
series of patches leading down from the most recent revision of a 
particular file.

At 11:02 AM 9/5/2000 -0400, you wrote:

>It was pointed out to me that my original fix to this section of code from
>cgi.c/cgi_download might be improved by inverting the order of tests that I
>had originally (default case was text/html).
>This version should handle any non html file properly as plain text. (the
>changes are marked as !!!!!)
>The other thing I added was a test for .htm since there was 1 file with that
>type ion the faq dir. (marked as <<<<<)
>Again, since I am a Stratus VOS person and not *nix I do not know (yet) how
>to submit this properly. I do see that my last version made it into the CVS
>tree and do appreciate the assistance.
>I do have a Linux box in my office. What I need is a recommended reading
>list that will give me the skills required to perform maintenance on the
>Samba code and documentation in the prescribed manner.
>   printf("HTTP/1.0 200 OK\r\n");
>   if ((p=strrchr(file,'.'))) {
>     if (strcmp(p,".gif")==0) {
>       printf("Content-Type: image/gif\r\n");
>     } else if (strcmp(p,".jpg")==0) {
>       printf("Content-Type: image/jpeg\r\n");
>     } else if (strcmp(p,".html")==0) {                  !!!!!!!!!!!!! 
> better order ?
>       printf("Content-Type: text/html\r\n");            !!!!!!!!!!!!!
>     } else if (strcmp(p,".htm")==0) 
> {                   <<<<<<<<<<<<<<<<<< Additional
>       printf("Content-Type: 
> text/html\r\n");            <<<<<<<<<<<<<<<<<< test
>     } 
> else 
> !!!!!!!!!!!!! Any NON html
>       printf("Content-Type: text/plain\r\n");           !!!!!!!!!!!!! 
> should now be
>formatted ok
>   }
>Ron Alexander

Pierre-Jules Tremblay, ing.		Cortex Machina Corp.
Chief Research Engineer		942-460 Ste-Catherine W.
trep at		Montreal, Canada H3B 1A7
(514) 395-9059 ext. 206

More information about the samba-technical mailing list