Skip to content

Commit 6400127

Browse files
authored
fix bug: Further bug fix #222
I noticed that #222 was not fully fixed。
1 parent 8b88be2 commit 6400127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tika/tika.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def parse1(option, urlOrPath, serverEndpoint=ServerEndpoint, verbose=Verbose, ti
324324
log.warning('config option must be one of meta, text, or all; using all.')
325325
service = services.get(option, services['all'])
326326
if service == '/tika': responseMimeType = 'text/plain'
327-
headers.update({'Accept': responseMimeType, 'Content-Disposition': make_content_disposition_header(path)})
327+
headers.update({'Accept': responseMimeType, 'Content-Disposition': make_content_disposition_header(path.encode('utf-8') if type(path) is unicode_string else path)})
328328
status, response = callServer('put', serverEndpoint, service, open(path, 'rb'),
329329
headers, verbose, tikaServerJar, config_path=config_path, rawResponse=rawResponse, requestOptions=requestOptions)
330330

0 commit comments

Comments
 (0)