cfcontent with a file url which returns a 403 doesn't throw an exception / fileExists returns true

Description

if the file doesn’t exist, i.e. it returned a 404, the tag throws an error

https://trycf.com/gist/655ebd1a32c320614cfde302019b4c78/lucee5?theme=monokai

fileExists() also says true

Environment

None

Attachments

2
  • 09 May 2023, 07:27 am
  • 09 May 2023, 07:27 am

Activity

Show:

Tom Chiverton 10 March 2025 at 09:15

Zac Spitzer 8 March 2025 at 09:53

let's start a new ticket to address this? Can you file one

Tom Chiverton 7 March 2025 at 16:49

I don’t totally follow what happened here, but we’re having issues in 6.1 with cfcontent and fileread() of URLs that only allow GET (eg will return 200), and so return a 402 for HEAD, failing :

https://dev.lucee.org/t/odd-cfcontent-behaviour-since-upgrade-from-6-0-to-6-1/14797/5

Pothys - MitrahSoft 28 May 2024 at 06:26

I've checked this ticket in the Lucee version 6.1.0.162-SNAPSHOT and currently, if the file does not exist then it’s throws the error.

Zac Spitzer 23 May 2024 at 08:20

this cases a problem with s3

[INFO] [java] [script] test.tickets.LDEV1129 (3 tests passed in 773 ms, 1 ERRORED) [INFO] [java] [script] ERRORED [INFO] [java] [script] [INFO] [java] [script] Suites/Specs: 1/4 [INFO] [java] [script] Failures: 0 [INFO] [java] [script] Errors: 1 [INFO] [java] [script] Pass: 3 [INFO] [java] [script] Skipped: 0 [INFO] [java] [script] [INFO] [java] [script] [INFO] [java] [script] Trying to access the file via url of the file name [INFO] [java] [script] [INFO] [java] [script] Errored: Source file [https://s3.amazonaws.com/lucee-ldev-6-1129-d6a7bbd3-016c-431e-9961-5f0929dc5477/test.txt] doesn't exist [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/tickets/LDEV1129.cfc:86 [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/tickets/LDEV1129.cfc:61 [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/tickets/LDEV1129.cfc:42 [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/_testRunner.cfc:283 [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/run-tests.cfm:348
Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 12 April 2022 at 14:08
Updated 21 March 2025 at 10:31
Resolved 28 May 2024 at 06:26

Flag notifications