为什么CUPS会提供Web服务器而不使用httpd? [英] Why CUPS ships a web server instead of using httpd?

查看:153
本文介绍了为什么CUPS会提供Web服务器而不使用httpd?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CUPS实现了自己的Web服务器,以在 http://localhost:631

CUPS implements its own web server to host CGI programs on http://localhost:631

服务器: https://github.com/apple/cups/blob/master/cups/http.c

CGI页面: https://github.com/apple/cups/tree/master/cgi-bin

仅为打印守护程序创建Web服务器似乎是重复的代码和过大的工作,这可能会导致代码难以维护,并可能导致错误.

Creating a web server just for a printing daemon seems like duplicate code and bloat that might lead to code harder to maintain and possible creation of bugs.

为什么不使用像Apache这样的实际httpd守护程序?

Why an actual httpd daemon like Apache is not used?

推荐答案

CUPS使用Internet打印协议(IPP)将作业从打印客户端传输到打印服务器(如果支持IPP,则可能传输到打印机).

CUPS uses the Internet Printing Protocol (IPP) for transferring jobs from print clients to print servers (and potentially to printers, if these support IPP).

IPP是 基于 HTTP.
但是IPP与HTTP 不同.

IPP is based on HTTP.
But IPP is not the same as HTTP.

此外,CUPS Web服务器与CUPS打印守护程序也不相同.您可以通过将 WebInterface No 放入 cupsd.conf 中来完全禁用Web界面.

Also, the CUPS web server is not the same as the CUPS printing daemon. You can disable the web interface completely by putting WebInterface No into your cupsd.conf.

使用Apache或任何其他HTTP守护程序不会带来太多的CUPS:因为这些守护程序不使用IPP,并且它们不提供任何作为打印服务器的功能.因此,仅将它们添加到CUPS中只是为了实现Web界面,而宁可膨胀 CUPS!

Using Apache or any other HTTP daemon would not so much unbloat CUPS: because these daemons do not talk IPP, and they do not provide any functions as a print server. Therefore, adding them to CUPS just for the web interface would rather bloat up CUPS!

这篇关于为什么CUPS会提供Web服务器而不使用httpd?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆