From ae9296352c1064182ad7f1c46c23af6348026c7e Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sun, 12 Aug 2018 20:44:35 +0000 Subject: [PATCH] 2018-08-11 Fred Gleason * Added a debug block for saving raw post data to 'RDFormPost'. --- ChangeLog | 2 ++ lib/rdformpost.cpp | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 42734b3c..ed5cc6f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17370,3 +17370,5 @@ 2018-08-11 Fred Gleason * Removed SysV-style init scripts. * Removed sysconfig support. +2018-08-11 Fred Gleason + * Added a debug block for saving raw post data to 'RDFormPost'. diff --git a/lib/rdformpost.cpp b/lib/rdformpost.cpp index c91c49c4..2075645e 100644 --- a/lib/rdformpost.cpp +++ b/lib/rdformpost.cpp @@ -510,6 +510,24 @@ void RDFormPost::LoadMultipartEncoding(char first) return; } + /* + * Uncomment to save raw post to disc + * + FILE *f; + if((f=fopen("/var/snd/post.dat","w"))!=NULL) { + char data[1025]; + int n; + + while((n=fread(data,1,1024,post_stream))>0) { + fwrite(data,1,n,f); + } + fclose(f); + printf("Content-type: text/html\n\n"); + printf("Raw post written to \"/var/snd/post.dat\"\n"); + exit(0); + } + */ + // // Get Separator Line //