-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 0.0.8
Showing
9 changed files
with
139 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<cfsilent> | ||
<cfparam name="url.requestMethod" default=""> | ||
<cfparam name="url.requestContentType" default=""> | ||
<cfparam name="url.requestBody" default=""> | ||
<cfparam name="url.customResponseHeader" default=""> | ||
<cfparam name="url.dump" default="false" type="boolean"> | ||
<cfheader name="CustomResponseHeader" value="#url.customResponseHeader#"> | ||
<cfheader statuscode="222" statustext="Test Pass"> | ||
<cfset reqData = getHTTPRequestData()> | ||
<cfset contentType = ""> | ||
<cfif structKeyExists(reqData.headers, "Content-Type")> | ||
<cfset contentType = reqData.headers["Content-Type"]> | ||
</cfif> | ||
</cfsilent> | ||
<cfoutput> | ||
<pre> | ||
#assert("cgi.request_method", url.requestMethod, cgi.request_method)# | ||
#assert("requestBody", url.requestBody, reqData.content)# | ||
#assert("Content-Type", url.requestContentType, contentType)# | ||
|
||
</pre> | ||
</cfoutput> | ||
|
||
<cfif url.dump> | ||
<cfdump var="#cgi#"> | ||
<cfdump var="#reqData#"> | ||
<cfdump var="#form#"> | ||
<cfdump var="#url#"> | ||
</cfif> | ||
|
||
<cfscript> | ||
function assert(name, expected, actual) { | ||
var msg = "#name# Expected: #expected#, Actual: #actual#"; | ||
if (expected != actual) { | ||
cfheader(statuscode="520", statustext="Test Failed"); | ||
msg = "[FAIL] " & msg; | ||
} else { | ||
msg = "[PASS] " & msg; | ||
} | ||
return msg; | ||
} | ||
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
component { | ||
|
||
remote numeric function add(numeric x, numeric y) { | ||
return x+y; | ||
} | ||
|
||
remote string function assertHTTPRequestMethod(string expectedMethod="") { | ||
var msg = "Expected #expectedMethod#, cgi.request_method=#cgi.request_method#"; | ||
if (cgi.request_method != arguments.expectedMethod) { | ||
cfheader(statuscode="405", statustext=msg); | ||
} | ||
return msg; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello <cfoutput>#server.lucee.version#</cfoutput> |