coldfusion-10

How to make EncodeForURL() encode the same way as URLEncodedFormat()

别等时光非礼了梦想. 提交于 2021-01-27 07:48:56
问题 The URLEncodedFormat() function does something that I specifically want which is this: Generates a URL-encoded string. For example, it replaces spaces with %20 Why does EncodeForURL() not do this? It replaces spaces with a plus "+" symbol instead which is stopping my URLs working. How would I be able to get around this other than using URLEncodedFormat()? 来源: https://stackoverflow.com/questions/25516195/how-to-make-encodeforurl-encode-the-same-way-as-urlencodedformat

How to make EncodeForURL() encode the same way as URLEncodedFormat()

我与影子孤独终老i 提交于 2021-01-27 07:42:42
问题 The URLEncodedFormat() function does something that I specifically want which is this: Generates a URL-encoded string. For example, it replaces spaces with %20 Why does EncodeForURL() not do this? It replaces spaces with a plus "+" symbol instead which is stopping my URLs working. How would I be able to get around this other than using URLEncodedFormat()? 来源: https://stackoverflow.com/questions/25516195/how-to-make-encodeforurl-encode-the-same-way-as-urlencodedformat

How to make EncodeForURL() encode the same way as URLEncodedFormat()

浪子不回头ぞ 提交于 2021-01-27 07:42:24
问题 The URLEncodedFormat() function does something that I specifically want which is this: Generates a URL-encoded string. For example, it replaces spaces with %20 Why does EncodeForURL() not do this? It replaces spaces with a plus "+" symbol instead which is stopping my URLs working. How would I be able to get around this other than using URLEncodedFormat()? 来源: https://stackoverflow.com/questions/25516195/how-to-make-encodeforurl-encode-the-same-way-as-urlencodedformat

ColdFusion 10 REST API: How to parse JSON in body of payload

风格不统一 提交于 2020-02-28 06:56:23
问题 I'm using ColdFusion 10's new build-in RESTful web services feature. When posting data, I'd like to send the payload as JSON in the body of the request. For example: PUT https://mycompany.com/rest/v1.0/widget/261469 HTTP/1.1 Host: mycompany.com Connection: keep-alive Content-Length: 13 Content-Type: application/json {"foo":"bar"} Once this data is posted through the API, how should I parse and deserialize the JSON data on the server? Does ColdFusion REST service have a built-in way to do this

Reproducible CFQUERYPARAM performance issue in Coldfusion 10

 ̄綄美尐妖づ 提交于 2020-02-03 04:55:21
问题 I've consistently been able to reproduce a serious parameterization performance issue with Coldfusion 10 querying SQL Server 2008 R2 and would be interested to know what others get. The code is below. What does the test do? It creates a table with 100 rows. A data column is blank in all but one. It then runs a Coldfusion query 10 times, half using cfqueryparam and half using a simple string. It returns a list with the response time for each. When I run this, apart from the initial calls, the

Can't get IIS 7/Coldfusion to deliver 404

纵然是瞬间 提交于 2020-01-24 07:32:10
问题 So... we have a custom CMS. We have a rewrite rule that any page request (when a file doesn't exist) goes to the root/index.cfm file. There we search our DB for the page in question. If the page exists, we serve up the correct template,etc. If the page doesn't exist I want to server up a 404 page. Now I "think" I cannot do this in IIS since I need to handle the request in CF, so it has to get through. The file will always exist. When the page doesn't exist I've tried using <cfheader

Can't get IIS 7/Coldfusion to deliver 404

↘锁芯ラ 提交于 2020-01-24 07:31:53
问题 So... we have a custom CMS. We have a rewrite rule that any page request (when a file doesn't exist) goes to the root/index.cfm file. There we search our DB for the page in question. If the page exists, we serve up the correct template,etc. If the page doesn't exist I want to server up a 404 page. Now I "think" I cannot do this in IIS since I need to handle the request in CF, so it has to get through. The file will always exist. When the page doesn't exist I've tried using <cfheader

Can't get IIS 7/Coldfusion to deliver 404

こ雲淡風輕ζ 提交于 2020-01-24 07:31:52
问题 So... we have a custom CMS. We have a rewrite rule that any page request (when a file doesn't exist) goes to the root/index.cfm file. There we search our DB for the page in question. If the page exists, we serve up the correct template,etc. If the page doesn't exist I want to server up a 404 page. Now I "think" I cannot do this in IIS since I need to handle the request in CF, so it has to get through. The file will always exist. When the page doesn't exist I've tried using <cfheader

How can i extract field name and values on a form easily

社会主义新天地 提交于 2020-01-16 04:57:08
问题 I am in need of parsing field name and values from an html form to add to my db. I know i can go and do a find "input name='" then start another find to find the closing "'" and get the data via mid function then do the same for value via find "value='" I was wondering if there is an easier way to loop the doc and extract all input names and the associated values ? Below is a sample of what my page to parse looks like <input name='a_glare' value='B' class='inputbox-highlighted-false' size='1'

ColdFusion10 CFDocument debug output

我的梦境 提交于 2020-01-15 06:06:35
问题 Is there a way to capture the complete HTML code from CFDocument before it generates the actual Document/PDF (for debugging)? The tag itself doesn't seem to support it. What works partially is storing the separate parts of the HTML via cfsavecontent but I can't capture the whole thing at once: <cfsavecontent variable="test123"> <style type="text/css" media="screen"> <!-- Style based on paperSize--> <cfoutput> #request.paperSize.css# </cfoutput> </style> </cfsavecontent> <cfdump var="#test123#