From 237ae78d015dfb778a38b1793610f4f8831c7475 Mon Sep 17 00:00:00 2001 From: David Wetzel Date: Sun, 19 Nov 2017 13:40:24 -0500 Subject: [PATCH] * GSWeb/GSWAjaxRequestHandler.* new files * GSWeb/GNUmakefile add GSWAjaxRequestHandler.*, WOAjaxRequestHandler.h * GSWeb/GSWApplication+Defaults.* add AjaxRequestHanderKey * GSWeb/GSWApplication.h add +ajaxRequestHandlerKey add +setAjaxRequestHandlerKey: * GSWeb/GSWApplication.m create ajax request handler in registerRequestHandlers * GSWeb/GSWComponentRequestHandler.m return current class instance in +handler (works in subclasses too..) * GSWConstants.* added ajax * GSWContext.* added +shouldNotStorePageInBacktrackCache * GSWeb/GSWMessage.* added storePageInBacktrackCache * GSWeb/GSWRequest.* added -isAjaxSubmit, ajaxFormSubmitKey * GSWeb/GSWSession.m * GSWeb/GSWeb.h * GSWeb/GSWWOCompatibility.h ajax adjustments --- GSWeb/GSWAjaxRequestHandler.h | 36 ++++++++++++++++++++++++++++ GSWeb/GSWAjaxRequestHandler.m | 45 +++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 GSWeb/GSWAjaxRequestHandler.h create mode 100644 GSWeb/GSWAjaxRequestHandler.m diff --git a/GSWeb/GSWAjaxRequestHandler.h b/GSWeb/GSWAjaxRequestHandler.h new file mode 100644 index 0000000..bea9ff7 --- /dev/null +++ b/GSWeb/GSWAjaxRequestHandler.h @@ -0,0 +1,36 @@ + +/** GSWAjaxRequestHandler.h - GSWeb: Class GSWAjaxRequestHandler + + Copyright (C) 2017 Free Software Foundation, Inc. + + Written by: David Wetzel + Date: Nov 2017 + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **/ + +#ifndef _GSWAjaxRequestHandler_h__ +#define _GSWAjaxRequestHandler_h__ + +@interface GSWAjaxRequestHandler : GSWComponentRequestHandler + +@end + +#endif // _GSWAjaxRequestHandler_h__ + diff --git a/GSWeb/GSWAjaxRequestHandler.m b/GSWeb/GSWAjaxRequestHandler.m new file mode 100644 index 0000000..98d6c82 --- /dev/null +++ b/GSWeb/GSWAjaxRequestHandler.m @@ -0,0 +1,45 @@ +/** GSWAjaxRequestHandler.m - GSWeb: Class GSWAjaxRequestHandler + + Copyright (C) 2017 Free Software Foundation, Inc. + + Written by: David Wetzel + Date: Nov 2017 + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **/ + +#include "config.h" + +#include "GSWeb.h" +#include "GSWPrivate.h" + +@implementation GSWAjaxRequestHandler + +-(GSWResponse*)handleRequest:(GSWRequest*)aRequest +{ + GSWResponse* response = nil; + + [aRequest setStorePageInBacktrackCache:NO]; + + response = [super handleRequest:aRequest]; + + return response; +} + +@end