989d921f5d
I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
85 lines
3.3 KiB
Diff
85 lines
3.3 KiB
Diff
Index: contrib/cvs/src/server.c
|
|
===================================================================
|
|
RCS file: /home/ncvs/src/contrib/cvs/src/server.c,v
|
|
retrieving revision 1.1.1.15
|
|
diff -u -r1.1.1.15 server.c
|
|
--- contrib/cvs/src/server.c 15 Apr 2004 01:01:55 -0000 1.1.1.15
|
|
+++ contrib/cvs/src/server.c 20 May 2004 13:03:43 -0000
|
|
@@ -1638,8 +1638,18 @@
|
|
&& strncmp (arg, name, cp - name) == 0)
|
|
{
|
|
timefield = strchr (cp + 1, '/') + 1;
|
|
- if (*timefield != '=')
|
|
+ /* If the time field is not currently empty, then one of
|
|
+ * serve_modified, serve_is_modified, & serve_unchanged were
|
|
+ * already called for this file. We would like to ignore the
|
|
+ * reinvocation silently or, better yet, exit with an error
|
|
+ * message, but we just avoid the copy-forward and overwrite the
|
|
+ * value from the last invocation instead. See the comment below
|
|
+ * for more.
|
|
+ */
|
|
+ if (*timefield == '/')
|
|
{
|
|
+ /* Copy forward one character. Space was allocated for this
|
|
+ * already in serve_entry(). */
|
|
cp = timefield + strlen (timefield);
|
|
cp[1] = '\0';
|
|
while (cp > timefield)
|
|
@@ -1647,8 +1657,17 @@
|
|
*cp = cp[-1];
|
|
--cp;
|
|
}
|
|
- *timefield = '=';
|
|
}
|
|
+ /* If *TIMEFIELD wasn't "/", we assume that it was because of
|
|
+ * multiple calls to Is-Modified & Unchanged by the client and
|
|
+ * just overwrite the value from the last call. Technically, we
|
|
+ * should probably either ignore calls after the first or send the
|
|
+ * client an error, since the client/server protocol specification
|
|
+ * specifies that only one call to either Is-Modified or Unchanged
|
|
+ * is allowed, but broken versions of WinCVS & TortoiseCVS rely on
|
|
+ * this behavior.
|
|
+ */
|
|
+ *timefield = '=';
|
|
break;
|
|
}
|
|
}
|
|
@@ -1682,8 +1701,18 @@
|
|
&& strncmp (arg, name, cp - name) == 0)
|
|
{
|
|
timefield = strchr (cp + 1, '/') + 1;
|
|
- if (!(timefield[0] == 'M' && timefield[1] == '/'))
|
|
+ /* If the time field is not currently empty, then one of
|
|
+ * serve_modified, serve_is_modified, & serve_unchanged were
|
|
+ * already called for this file. We would like to ignore the
|
|
+ * reinvocation silently or, better yet, exit with an error
|
|
+ * message, but we just avoid the copy-forward and overwrite the
|
|
+ * value from the last invocation instead. See the comment below
|
|
+ * for more.
|
|
+ */
|
|
+ if (*timefield == '/')
|
|
{
|
|
+ /* Copy forward one character. Space was allocated for this
|
|
+ * already in serve_entry(). */
|
|
cp = timefield + strlen (timefield);
|
|
cp[1] = '\0';
|
|
while (cp > timefield)
|
|
@@ -1691,8 +1720,17 @@
|
|
*cp = cp[-1];
|
|
--cp;
|
|
}
|
|
- *timefield = 'M';
|
|
}
|
|
+ /* If *TIMEFIELD wasn't "/", we assume that it was because of
|
|
+ * multiple calls to Is-Modified & Unchanged by the client and
|
|
+ * just overwrite the value from the last call. Technically, we
|
|
+ * should probably either ignore calls after the first or send the
|
|
+ * client an error, since the client/server protocol specification
|
|
+ * specifies that only one call to either Is-Modified or Unchanged
|
|
+ * is allowed, but broken versions of WinCVS & TortoiseCVS rely on
|
|
+ * this behavior.
|
|
+ */
|
|
+ *timefield = 'M';
|
|
if (kopt != NULL)
|
|
{
|
|
if (alloc_pending (strlen (name) + 80))
|