Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 bugfixes for WOAdaptor #501

Merged
merged 8 commits into from
Nov 3, 2013
Merged
11 changes: 7 additions & 4 deletions Utilities/Adaptors/Adaptor/appcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,8 @@ static void readServerConfig() {
oneOrMoreUnModified = 1;
else // No response has to be treated as modification, too
oneOrMoreModified = 1;
}
} else
buffer[i] = NULL;
}
}

Expand Down Expand Up @@ -1191,9 +1192,11 @@ static net_fd _contactServer(ConfigServer *server) {
strcat(request_str, " HTTP/1.0\n");
req.request_str = request_str;
req.headers = st_new(2);
if (server->lastModifiedTime[0]) {
req_addHeader(&req,HTTP_IFMODIFIEDSINCE,server->lastModifiedTime, STR_COPYVALUE|STR_FREEVALUE);
}
// Does not work due to a bug in merging unchanged config (according to this
// lastModifiedField) with changed config data
//if (server->lastModifiedTime[0]) {
// req_addHeader(&req,HTTP_IFMODIFIEDSINCE,server->lastModifiedTime, STR_COPYVALUE|STR_FREEVALUE);
//}
if (req_sendRequest(&req, s) != 0) {
transport->close_connection(s);
s = NULL;
Expand Down
2 changes: 1 addition & 1 deletion Utilities/Adaptors/Adaptor/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ typedef int intptr_t;
#define CURRENT_WOF_VERSION_MAJOR 4
#define CURRENT_WOF_VERSION_MINOR 6

#define ADAPTOR_VERSION "4.6"
#define ADAPTOR_VERSION "4.6.1"

/* Used to turn the value of a macro into a string literal */
#define _Str(x) #x
Expand Down
5 changes: 4 additions & 1 deletion Utilities/Adaptors/Adaptor/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ static int shouldLog()
if (statTime < now) {
struct stat statbuf;
statTime = now + STATINTERVAL; /* reset timer */
_shouldLog = ( (stat(logFlag,&statbuf) == 0) && (statbuf.st_uid == 0) );
_shouldLog = (stat(logFlag,&statbuf) == 0);
#ifndef WIN32
_shouldLog = _shouldLog && (statbuf.st_uid == 0); // requesting root ownership does not make sense under Win32
#endif
}
WA_unlock(logMutex);
return _shouldLog;
Expand Down
7 changes: 7 additions & 0 deletions Utilities/Adaptors/IIS/Installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,19 @@ <H2>Microsoft IIS 5-6 Web Server ISAPI Adaptor for WebObjects</H2>

<H2>Microsoft IIS 7.x Web Server ISAPI Adaptor for WebObjects</H2>

<p>
Additionally to the tasks mentioned above, you have to take care that ISAPI-extensions are installed.
WebObjects.dll has to be registered unter CGI-/ISAPI-Restrictions. Unter Handler-Mappings, enable DLL-Exection.
</p>

<p>
By using MINGW you can build WebObjects-Adaptor as 32bit and as 64bit-DLL.
</p>

<p>
The 32-Bit-DLL will run fine on 32-Bit IIS and 64-Bit-DLL will run fine on 64-Bit IIS.<br/>
When you intend to use the 32-Bit-DLL with an 64-Bit IIS, take care to configure the application pool to run in 32 bit mode and configure all registry keys named above in the Wow6432Node.
</p>

</BODY>
</HTML>
15 changes: 15 additions & 0 deletions Utilities/Adaptors/IIS/WebObjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,21 @@ __declspec(dllexport) DWORD __stdcall HttpExtensionProc(EXTENSION_CONTROL_BLOCK
return HSE_STATUS_ERROR;
}

// Deactivate IIS 7.x stream buffering
// IIS 7.x (and above?) behaves differently from IIS 6 by introducing
// output buffering ISAPI Extension output
// This could cause interrupted and hence incomplete streaming output
// This change does deactivate the output buffering in IIS 7.x
// (see http://support.microsoft.com/kb/946086) and does not harm
// when called within IIS 6
//
p->ServerSupportFunction (p->ConnID,
HSE_REQ_SET_FLUSH_FLAG,
(LPVOID) TRUE,
NULL,
NULL
);

/*
* extract WebObjects request components from URI
*/
Expand Down
1 change: 1 addition & 0 deletions Utilities/Adaptors/IIS/httpext.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ typedef LPVOID HCONN;
#define HSE_REQ_END_RESERVED 1000
#define HSE_REQ_IO_COMPLETION (HSE_REQ_END_RESERVED + 5)
#define HSE_REQ_CLOSE_CONNECTION (HSE_REQ_END_RESERVED + 17)
#define HSE_REQ_SET_FLUSH_FLAG (HSE_REQ_END_RESERVED + 43)

/*
* Flags for IO Functions, supported for IO Funcs.
Expand Down