happyfish100 / happyfish100/fastdfs-client-java
用get_file_info获取文件信息出现错误:Input to decode not an even multiple of 4 characters; pad with =.
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 891
- PR merge metrics
- No merged PRs in 30d
Description
问题如标题所示。
查看代码发现:
byte[] buff = base64.decodeAuto(remote_filename.substring(ProtoCommon.FDFS_FILE_PATH_LEN,
ProtoCommon.FDFS_FILE_PATH_LEN + ProtoCommon.FDFS_FILENAME_BASE64_LENGTH));
此处,FDFS_FILENAME_BASE64_LENGTH=27
经测试,如果设为28则结果正确。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the get_file_info path and inspect the base64.decodeAuto call using remote_filename, along with the FDFS_FILENAME_BASE64_LENGTH definition and ProtoCommon constants. Reproduce the decoding error, verify the correct filename length against the client behavior, and add or run a focused regression check if the repository provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100